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

:root {
  --bg: #070614;
  --bg2: #0f0e1f;
  --bg3: #1a1830;
  --accent: #00b1e6;
  --accent2: #0090c0;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --nav-height: 70px;
  --header-height: 56px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Login */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-logo { width: 120px; margin-bottom: 16px; }
.login-container h1 { color: var(--accent); margin-bottom: 32px; font-size: 24px; }
.login-container form { width: 100%; max-width: 340px; }

/* Header */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: rgba(7,6,20,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,177,230,0.15);
  display: flex; align-items: center; padding: 0 16px; gap: 10px;
}
.header-logo { height: 32px; }
.header-title { 
  font-weight: 700; 
  font-size: 16px; 
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 177, 230, 0.6);
  letter-spacing: 0.5px;
}

/* Content */
.content {
  padding: calc(var(--header-height) + 12px) 16px calc(var(--nav-height) + 16px);
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
}

/* TODO ITEMS CLICKABLE */
[data-todo-title] {
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-todo-title]:hover {
  opacity: 0.8;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(7,6,20,0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,177,230,0.15);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-btn {
  background: none; border: none; color: var(--text2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10px; padding: 8px 16px; cursor: pointer;
  transition: color 0.2s;
}
.nav-btn i { font-size: 20px; }
.nav-btn.active { color: var(--accent); }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 4px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 80px; resize: vertical; position: relative; }
.form-group div[style*="position: relative"] { position: relative; }
.form-group select { appearance: auto; cursor: pointer; }
.form-group input[type="date"], .form-group input[type="time"] { color-scheme: dark; }

/* Buttons */
.btn {
  padding: 12px 24px; border-radius: var(--radius); border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent2); transform: scale(0.98); }
.btn-secondary { background: var(--bg3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn i { font-size: 14px; }

.btn-fab {
  position: fixed; bottom: calc(var(--nav-height) + 16px); right: 16px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 24px; cursor: pointer; box-shadow: 0 4px 20px rgba(0,177,230,0.4);
  z-index: 50; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.btn-fab:active { transform: scale(0.9); }

/* Cards */
.card {
  background: var(--bg2); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 16px; margin-bottom: 12px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card h3 { font-size: 16px; font-weight: 600; }
.card-meta { font-size: 13px; color: var(--text2); }

/* Status Badges */
.status-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  display: inline-block; position: relative;
}
.status-unterschrieben { background: rgba(0,188,212,0.15); color: #00bcd4; }
.status-in-planung { background: rgba(255,152,0,0.15); color: #ff9800; }
.status-geplant { background: rgba(255,152,0,0.15); color: #ff9800; }
.status-dc-montage { background: rgba(233,30,99,0.15); color: #e91e63; }
.status-ac-montage { background: rgba(156,39,176,0.15); color: #9c27b0; }
.status-in-montage { background: rgba(233,30,99,0.15); color: #e91e63; }
.status-abnahme { background: rgba(76,175,80,0.15); color: #4caf50; }
.status-fertig { background: rgba(33,150,243,0.15); color: #2196f3; }
.status-förderungen { background: rgba(139,195,74,0.15); color: #8bc34a; }

/* Dashboard Stats */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 16px; text-align: center;
}
.stat-card .stat-number { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-card .stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.stat-card.wide { grid-column: span 2; }

/* Search */
.search-bar {
  position: relative; margin-bottom: 16px;
}
.search-bar input {
  width: 100%; padding: 12px 14px 12px 42px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text); font-size: 15px;
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text2); font-size: 16px;
}

/* List */
.customer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg2); border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.customer-item:active { border-color: var(--accent); }
.customer-item .info { flex: 1; min-width: 0; }
.customer-item .info h4 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-item .info p { font-size: 12px; color: var(--text2); margin-top: 2px; }
.customer-item .chevron { color: var(--text2); font-size: 14px; }

/* Calendar */
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.calendar-header h2 { font-size: 18px; }
.calendar-nav { display: flex; gap: 8px; }
.calendar-nav button {
  background: var(--bg3); border: none; color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.calendar-grid {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 20px;
}
.calendar-grid .day-header,
.calendar-week-header .day-header {
  text-align: center; font-size: 11px; color: var(--text2);
  padding: 8px 0; font-weight: 600;
}
.calendar-grid .day-cell,
.calendar-week-row .day-cell {
  text-align: center; padding: 8px 4px; border-radius: 0;
  font-size: 14px; cursor: pointer; min-height: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; background: var(--card-bg, #1a1830);
}
.calendar-grid .day-cell.other { color: var(--text2); opacity: 0.3; }
.calendar-grid .day-cell.today { background: var(--accent); color: #fff; font-weight: 700; }
.calendar-grid .day-cell.has-events::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.calendar-grid .day-cell.today.has-events::after { background: #fff; }
.calendar-grid .day-cell.selected { border: 2px solid var(--accent); }

/* Appointments */
.appointment-item {
  padding: 12px 16px; background: var(--bg2); border-radius: var(--radius);
  margin-bottom: 8px; border-left: 3px solid var(--accent);
  border: 1px solid rgba(255,255,255,0.06);
}
.appointment-item .time { font-size: 13px; color: var(--accent); font-weight: 600; }
.appointment-item .title { font-size: 14px; margin-top: 2px; }
.appointment-item .meta { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* Photo Gallery */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.photo-grid .photo-item {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer;
  position: relative;
}
.photo-grid .photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .photo-item .photo-cat {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 4px;
  font-size: 9px; color: var(--text);
}
.photo-delete-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,53,69,0.85); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; z-index: 2; opacity: 0.7; transition: opacity 0.2s;
}
.photo-delete-btn:hover { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.95); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 95vw; max-height: 90vh; object-fit: contain; }
.lightbox .close-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer;
}

/* Signature Canvas */
.signature-pad {
  background: #fff; border-radius: var(--radius);
  touch-action: none; width: 100%; height: 150px;
  cursor: crosshair;
}
.signature-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.signature-label button { font-size: 12px; }

/* Checklist */
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.checklist-item label { flex: 1; font-size: 14px; cursor: pointer; }
.checklist-item input[type="checkbox"] {
  width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--bg2); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 500px; max-height: 90vh;
  overflow-y: auto; padding: 24px 20px;
  animation: slideUp 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 18px; }
.modal-close { background: none; border: none; color: var(--text2); font-size: 24px; cursor: pointer; padding: 4px; }

/* Section Headers */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; margin-top: 20px;
}
.section-header h2 { font-size: 18px; font-weight: 700; }
.section-header:first-child { margin-top: 0; }

/* Page Title */
.page-title {
  font-size: 22px; font-weight: 800; margin-bottom: 16px;
}

/* Tabs */
.tabs {
  display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.tab {
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer; border: none;
  background: var(--bg3); color: var(--text2);
  transition: all 0.2s; position: relative;
}
.tab.active { background: var(--accent); color: #fff; }
.tab[title]:hover::after, .status-badge[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,30,0.95); color: #fff; padding: 8px 12px;
  border-radius: 8px; font-size: 12px; font-weight: 400;
  white-space: nowrap; z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
}
.tab[title]:hover::before, .status-badge[title]:hover::before {
  content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(30,30,30,0.95); z-index: 1000;
}

/* Back Button */
.back-btn {
  background: none; border: none; color: var(--accent); font-size: 14px;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding: 4px 0; font-family: inherit; font-weight: 500;
}

/* Error */
.error-msg { color: var(--danger); font-size: 13px; margin-top: 8px; text-align: center; }
.success-msg { color: var(--success); font-size: 13px; margin-top: 8px; text-align: center; }

/* Empty State */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text2);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* Responsive tweaks */
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Detail Tabs */
.detail-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-bottom: 2px solid var(--bg3);
}
.detail-tab {
  flex: 1; text-align: center; padding: 10px 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; background: none; color: var(--text2);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.2s;
}
.detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.detail-tab i { display: block; font-size: 18px; margin-bottom: 4px; }

/* Actions row */
.actions-row {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}

/* Filter row */
.filter-row {
  display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-height) + 16px); left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; z-index: 300; opacity: 0;
  transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* Upload */
.upload-area {
  border: 2px dashed rgba(0,177,230,0.3); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color 0.2s;
}
.upload-area:active { border-color: var(--accent); }
.upload-area i { font-size: 32px; color: var(--accent); margin-bottom: 8px; }
.upload-area p { font-size: 13px; color: var(--text2); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

/* Enhanced Calendar */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.calendar-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.view-toggle {
  display: flex;
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active {
  background: var(--accent);
  color: white;
}

.day-cell {
  position: relative;
  padding: 8px 4px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.day-number {
  font-size: 14px;
  font-weight: 500;
}

.day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.day-dots {
  display: none;
}

.type-dot {
  display: none;
}

.type-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding: 12px;
  background: var(--bg2);
  border-radius: var(--radius);
  font-size: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text2);
  min-width: 104px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font: inherit;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.legend-item:hover,
.legend-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(34,211,238,0.4);
  background: rgba(34,211,238,0.08);
  outline: none;
}

.legend-item.is-empty {
  opacity: .55;
}

.legend-count {
  display: inline-flex;
  min-width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,188,212,0.16);
  border: 1px solid rgba(0,188,212,0.32);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.legend-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.type-legend .type-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
}

/* Week View */
.week-view {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.week-day {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 120px;
  cursor: pointer;
  transition: background 0.2s;
}

.week-day:hover {
  background: var(--bg3);
}

.week-day.today {
  border: 2px solid var(--accent);
}

.week-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.day-name {
  color: var(--text2);
}

.day-num {
  color: var(--text);
  font-size: 16px;
}

.week-appointments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-appointment {
  background: var(--bg3);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.week-appointment:hover {
  background: var(--bg);
}

.week-appointment .time {
  color: var(--text2);
  font-size: 9px;
}

.week-appointment .title {
  font-weight: 500;
  margin: 2px 0;
}

.week-appointment .type {
  color: var(--text2);
  font-size: 9px;
}

.no-appointments {
  color: var(--text2);
  font-size: 11px;
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

/* Enhanced Dashboard */
.appointment-item.prominent {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.appointment-item.this-week {
  border-left-width: 4px !important;
}

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.appointment-header .time {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.appointment-header .type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

/* Navigation Badge */
.nav-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.badge {
  position: absolute;
  top: 2px;
  right: 8px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}

/* Modal Enhancements */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg3);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text2);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg3);
  color: var(--text);
}

/* Loading Spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 6, 20, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 177, 230, 0.3);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Skeleton Loader */
@keyframes skeleton-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-loader {
  display: inline-block;
  width: 100%;
  height: 1em;
  border-radius: var(--radius, 8px);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  position: relative;
  overflow: hidden;
}

.skeleton-loader.skeleton-card {
  height: 80px;
  border-radius: var(--radius, 12px);
  margin-bottom: 10px;
}

.skeleton-loader.skeleton-text {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-loader.skeleton-text.short {
  width: 60%;
}

.skeleton-loader.skeleton-text.medium {
  width: 80%;
}

.skeleton-loader.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Stat card skeleton placeholder */
.stat-card.skeleton-loader {
  height: 90px;
  cursor: default;
}

.stat-card.skeleton-loader:hover {
  transform: none;
}

/* Swipe Gestures */
.swipe-indicator {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 24px;
  opacity: 0;
  transition: all 0.3s;
}

.swipe-indicator.show {
  opacity: 1;
  top: -40px;
}

/* Enhanced Touch Targets */
.day-cell, .week-day, .appointment-item, .stat-card {
  min-height: 44px;
  -webkit-tap-highlight-color: rgba(0, 177, 230, 0.1);
}

/* Voice Button */
.voice-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  z-index: 10;
}

.voice-button:hover {
  background: var(--accent2);
  transform: scale(1.05);
}

.voice-button.recording {
  background: var(--danger);
  animation: pulse-recording 1s infinite;
}

@keyframes pulse-recording {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Better Focus States for Accessibility */
button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth Animations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-title, .section-header, .appointment-item, .stat-card, .week-day {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Improvements */
@media (max-width: 768px) {
  .week-view {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .week-day {
    min-height: 80px;
  }
  
  .type-legend {
    font-size: 10px;
    gap: 8px;
  }

  .legend-item {
    min-width: 84px;
    padding: 7px 8px;
  }
  
  .calendar-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .calendar-title {
    width: 100%;
  }
  
  /* Better touch targets on mobile */
  .nav-btn {
    padding: 12px 8px;
  }
  
  .day-cell {
    min-height: 60px;
    padding: 12px 4px;
  }
  
  .appointment-item {
    padding: 16px;
    margin-bottom: 8px;
  }
  
  /* Improve modal on mobile */
  .modal-content {
    margin: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

/* ============ OCR STYLES ============ */
.ocr-buttons {
  margin-bottom: 20px;
}

.ocr-buttons .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

#ocr-preview {
  background: var(--card-bg, #1a1830);
  border: 1px solid var(--border, rgba(0,177,230,0.15));
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

#ocr-preview h4 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 16px;
}

.ocr-fields {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
}

.ocr-fields .form-group {
  margin: 0;
}

.ocr-fields label {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

.ocr-fields input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  background: var(--input-bg, #0f0e1f);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.ocr-fields input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,177,230,0.15);
}

/* ============ TODO STYLES ============ */
#wichtig-section,
#todo-section {
  margin: 20px 0;
  padding: 16px;
  background: var(--card-bg, #1a1830);
  border-radius: var(--radius);
  border: 1px solid var(--border, rgba(0,177,230,0.15));
}

#wichtig-section {
  border-color: rgba(255, 107, 53, 0.3);
}

#wichtig-section h2 {
  color: #ff6b35;
}

#wichtig-section .section-header {
  margin-bottom: 12px;
}

#todo-section .section-header {
  margin-bottom: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s ease;
}

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

.todo-item:hover {
  background: rgba(255,255,255,0.05);
  margin: 0 -8px;
  padding: 8px;
  border-radius: 4px;
}

.todo-item input[type="checkbox"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.todo-item span {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

#wichtig-section .todo-item > div {
  min-width: 0;
}

#wichtig-section .todo-item span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

#wichtig-section .todo-item > div > div > span:first-child {
  flex: 0 0 18px;
}

#wichtig-section .todo-item > div > div > span:last-child {
  flex: 1 1 auto;
}

.todo-add-form {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 10;
}

.todo-add-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  background: var(--input-bg, #0f0e1f);
  color: var(--text);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.todo-add-form input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,177,230,0.15);
}

.todo-add-form .btn {
  padding: 10px 14px;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

/* Todo animations */
.todo-item input[type="checkbox"] {
  transition: all 0.2s ease;
}

.todo-item input[type="checkbox"]:checked + span {
  transition: all 0.3s ease;
}

/* Empty states for todo sections */
#wichtig-section .empty-state,
#todo-section .empty-state {
  text-align: center;
  padding: 20px 0;
  color: var(--text2, #94a3b8);
  font-style: italic;
}

/* Important todo styling */
.todo-item.important {
  border-left: 3px solid #ff6b35;
  padding-left: 8px;
  background: rgba(255, 107, 53, 0.05);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #wichtig-section,
  #todo-section {
    margin: 15px 0;
    padding: 12px;
  }
  
  .todo-add-form {
    flex-direction: column;
    gap: 8px;
  }
  
  .todo-add-form input {
    width: 100%;
  }
  
  .todo-add-form .btn {
    width: 100%;
  }
  
  .ocr-buttons {
    gap: 8px;
  }
  
  .ocr-buttons .btn {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ============ CALENDAR WEEK NUMBERS ============ */
.calendar-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}

.calendar-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}

.week-number-header {
  display: none;
}

.week-number {
  display: none;
}

/* ============ CUSTOMER PORTAL STYLES ============ */
.calendar-hero {
  position: relative;
  margin: 8px 0 18px;
  padding: 18px;
  border: 1px solid rgba(0,177,230,0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 10%, rgba(0,177,230,0.22), transparent 34%),
    radial-gradient(circle at 88% 22%, rgba(245,158,11,0.14), transparent 28%),
    linear-gradient(145deg, rgba(15,14,31,0.96), rgba(18,25,48,0.84));
  box-shadow: 0 18px 50px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
}

.calendar-hero::after {
  content: '';
  position: absolute;
  inset: auto 24px -65px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(0,177,230,0.11);
  filter: blur(4px);
  pointer-events: none;
}

.calendar-hero .calendar-header {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.calendar-kicker {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-title h2 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  color: #f8fafc;
  text-shadow: 0 10px 28px rgba(0,177,230,0.28);
}

.calendar-nav button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.calendar-nav button:hover {
  transform: translateY(-2px);
  background: rgba(0,177,230,0.18);
  border-color: rgba(0,177,230,0.35);
}

.view-toggle {
  padding: 4px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}

.view-btn {
  min-width: 74px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.view-btn.active {
  background: linear-gradient(135deg, #00b1e6, #13c7d8);
  box-shadow: 0 8px 24px rgba(0,177,230,0.3);
}

.calendar-month-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.calendar-month-stats div,
.calendar-month-stats button {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(7,6,20,0.34);
  backdrop-filter: blur(10px);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.calendar-month-stats button:hover {
  background: rgba(0,188,212,0.14);
  border-color: rgba(0,188,212,0.42);
  transform: translateY(-2px);
}

.calendar-month-stats strong {
  display: block;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
}

.calendar-month-stats span {
  display: block;
  margin-top: 5px;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-stat-list-modal { max-width: 780px; width: 94%; max-height: 84vh; overflow: hidden; }
.calendar-stat-list-modal .modal-body { max-height: 70vh; overflow: auto; }
.calendar-stat-subtitle { color: #9fb2c8; margin: 0 0 14px; }
.calendar-stat-list { display: grid; gap: 10px; }
.calendar-stat-appointment-row,
.calendar-stat-day-row {
  align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  color: #e8eef8;
  cursor: pointer;
  display: grid;
  gap: 12px;
  padding: 12px;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  width: 100%;
}
.calendar-stat-appointment-row { grid-template-columns: 12px minmax(0,1fr) auto; }
.calendar-stat-day-row { grid-template-columns: minmax(0,1fr) auto; }
.calendar-stat-appointment-row:hover,
.calendar-stat-day-row:hover {
  background: rgba(0,188,212,.12);
  border-color: rgba(0,188,212,.35);
  transform: translateY(-1px);
}
.calendar-stat-dot { border-radius: 99px; height: 36px; width: 5px; }
.calendar-stat-main strong { color: #fff; display: block; font-size: 15px; }
.calendar-stat-main small { color: #9fb2c8; display: block; margin-top: 4px; }
.calendar-stat-main em { color: #cbd5e1; display: block; font-style: normal; margin-top: 7px; overflow-wrap: anywhere; }
.calendar-stat-day-row span { color: #fff; font-weight: 800; }
.calendar-stat-day-row strong { color: #66e7ff; }

.calendar-grid {
  gap: 8px;
  margin-bottom: 22px;
}

.calendar-week-header {
  gap: 8px;
  background: transparent;
  margin-bottom: 8px;
}

.calendar-week-header .day-header {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: #b8c7df;
  font-size: 12px;
}

.calendar-week-row {
  gap: 8px;
  margin-bottom: 0;
  background: transparent;
  overflow: visible;
}

.calendar-grid .day-cell,
.calendar-week-row .day-cell {
  min-height: 82px;
  padding: 12px 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(26,24,48,0.96), rgba(22,31,55,0.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.calendar-grid .day-cell:hover,
.calendar-week-row .day-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(0,177,230,0.38);
  background: linear-gradient(145deg, rgba(20,44,72,0.95), rgba(26,24,48,0.98));
}

.calendar-grid .day-cell.today,
.calendar-week-row .day-cell.today {
  background: linear-gradient(145deg, #07b7dd, #0f8fc8);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 14px 32px rgba(0,177,230,0.28);
}

.calendar-grid .day-cell.selected,
.calendar-week-row .day-cell.selected {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.16);
}

.calendar-grid .day-cell.has-events::after {
  display: none;
}

.day-number {
  font-size: 17px;
  font-weight: 800;
}

.day-badge {
  width: auto;
  min-width: 28px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0,177,230,0.18);
  border: 1px solid rgba(103,232,249,0.35);
  color: #e0faff;
  box-shadow: 0 8px 20px rgba(0,177,230,0.18);
}

.day-cell.today .day-badge {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.36);
}

.type-legend {
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(15,14,31,0.72);
}

.calendar-agenda {
  margin-top: 22px;
}

.calendar-agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 14px;
}

.calendar-agenda-header h2 {
  margin-top: 3px;
  font-size: 23px;
}

.calendar-agenda-header span {
  color: #67e8f9;
  border: 1px solid rgba(103,232,249,0.22);
  background: rgba(0,177,230,0.1);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-agenda-date {
  display: inline-flex;
  margin: 16px 0 8px;
  color: #67e8f9;
  background: rgba(0,177,230,0.09);
  border: 1px solid rgba(0,177,230,0.18);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-agenda .appointment-item {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15,14,31,0.95), rgba(26,24,48,0.86));
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.calendar-agenda .appointment-item:hover {
  transform: translateX(3px);
  border-color: rgba(255,255,255,0.13);
}

.calendar-agenda .appointment-item.calendar-type-highlight {
  border-color: rgba(34,211,238,0.75) !important;
  box-shadow: 0 0 0 2px rgba(34,211,238,0.22), 0 14px 34px rgba(0,188,212,0.18);
  transform: translateX(4px);
}

.appointment-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sonepar-material-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(34, 197, 94, 0.36);
  background: rgba(34, 197, 94, 0.13);
  color: #bbf7d0;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.sonepar-material-btn:hover {
  border-color: rgba(34, 197, 94, 0.62);
  background: rgba(34, 197, 94, 0.22);
}

.sonepar-material-panel {
  max-width: 760px;
}

.sonepar-material-context,
.sonepar-material-problem {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.sonepar-material-context span,
.sonepar-material-problem small,
.sonepar-material-link small {
  display: block;
  color: var(--text2);
  font-size: 12px;
  margin-top: 4px;
}

.sonepar-material-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-top: 14px;
}

.sonepar-material-grid h4 {
  font-size: 14px;
  margin: 0 0 8px;
}

.sonepar-material-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
}

.sonepar-material-items {
  display: grid;
  gap: 8px;
}

.sonepar-material-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.sonepar-material-link:hover {
  background: rgba(34, 197, 94, 0.16);
}

.sonepar-material-link i {
  color: #86efac;
}

.sonepar-material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.sonepar-product-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 188, 212, 0.32);
  background: rgba(0, 188, 212, 0.08);
  border-radius: 12px;
}

.sonepar-product-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sonepar-product-head small {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sonepar-product-head strong {
  color: var(--text);
  font-size: 18px;
}

.sonepar-product-sku {
  display: block;
  margin-top: 4px;
  color: #ffd166;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.sonepar-product-card p {
  color: var(--text2);
  margin: 0 0 12px;
  line-height: 1.45;
}

.sonepar-product-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sonepar-product-cols h5 {
  color: var(--text);
  margin: 0 0 6px;
  font-size: 13px;
}

.sonepar-product-cols ul {
  margin: 0;
  padding-left: 17px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.45;
}

.sonepar-cart-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 193, 7, 0.34);
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.1);
  color: var(--text);
}

.sonepar-cart-note strong {
  color: #ffd166;
  font-size: 14px;
}

.sonepar-cart-note span {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .sonepar-material-grid {
    grid-template-columns: 1fr;
  }

  .sonepar-material-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .sonepar-product-cols {
    grid-template-columns: 1fr;
  }

  .calendar-hero {
    padding: 14px;
    border-radius: 20px;
  }

  .calendar-hero .calendar-header {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    gap: 10px;
  }

  .calendar-title h2 {
    font-size: 24px;
  }

  .calendar-month-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-week-header,
  .calendar-week-row {
    gap: 5px;
  }

  .calendar-grid .day-cell,
  .calendar-week-row .day-cell {
    min-height: 64px;
    border-radius: 14px;
    padding: 9px 5px;
  }

  .day-number {
    font-size: 15px;
  }

  .day-badge {
    min-width: 24px;
    height: 22px;
    font-size: 10px;
  }
}

.portal-login {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.portal-login-container {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 48px;
  width: 100%;
  max-width: 400px;
  margin: 24px;
}

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

.portal-logo h1 {
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 8px;
}

.portal-logo p {
  color: var(--text2);
  font-size: 16px;
}

.portal-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.portal-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--bg3);
  padding: 16px 24px;
}

.portal-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-header h1 {
  color: var(--accent);
  font-size: 24px;
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text2);
}

.portal-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--bg3);
  padding: 0 24px;
  overflow-x: auto;
}

.portal-nav-btn {
  background: transparent;
  border: none;
  color: var(--text2);
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.portal-nav-btn:hover {
  color: var(--text);
}

.portal-nav-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.portal-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.portal-section {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.portal-section h2 {
  color: var(--text);
  font-size: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-section h3 {
  color: var(--text);
  font-size: 16px;
  margin: 16px 0 8px 0;
}

/* Status Progress */
.status-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  opacity: 0.5;
  transition: all 0.3s;
}

.progress-step.completed,
.progress-step.current {
  opacity: 1;
}

.progress-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid var(--bg3);
  color: var(--text2);
  transition: all 0.3s;
}

.progress-step.completed .progress-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.progress-step.current .progress-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 177, 230, 0.2);
}

.progress-label {
  font-size: 12px;
  text-align: center;
  color: var(--text2);
  line-height: 1.2;
}

.progress-step.completed .progress-label,
.progress-step.current .progress-label {
  color: var(--text);
  font-weight: 500;
}

.next-step-hint {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(0,188,212,0.1);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: #ccc;
  line-height: 1.5;
}

/* Förderung Info */
.foerderung-info {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  border-left: 4px solid var(--success);
}

.project-info {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

/* Availability */
.availability-form {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.availability-list {
  margin-top: 24px;
}

.availability-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg3);
  border-radius: 8px;
  margin-bottom: 8px;
}

.availability-item .date {
  font-weight: 500;
}

.availability-item .note {
  color: var(--text2);
  font-size: 14px;
}

/* Files */
.upload-section {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.upload-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.upload-info {
  color: var(--text2);
  font-size: 14px;
}

.files-list {
  margin-top: 24px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg3);
  border-radius: 8px;
  margin-bottom: 8px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.file-info i {
  color: var(--accent);
  font-size: 20px;
  width: 24px;
}

.file-details {
  flex: 1;
}

.file-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.file-meta {
  color: var(--text2);
  font-size: 12px;
}

/* Messages */
.messages-container {
  max-height: 400px;
  overflow-y: auto;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg3);
  border-radius: 8px;
}

.message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.message-in {
  align-items: flex-start;
}

.message-out {
  align-items: flex-end;
}

.message-content {
  background: var(--bg2);
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 70%;
  word-wrap: break-word;
}

.message-out .message-content {
  background: var(--accent);
  color: white;
}

.message-time {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

.message-form {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
}

.message-input-group {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.message-input-group textarea {
  flex: 1;
  resize: vertical;
  min-height: 80px;
}

.message-input-group .btn {
  flex-shrink: 0;
  padding: 12px 16px;
  height: fit-content;
}

.empty-message {
  text-align: center;
  color: var(--text2);
  font-style: italic;
  padding: 24px;
}

/* Admin Portal Styles */
.portal-admin-section,
.portal-messages-section {
  background: var(--bg3);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.portal-credentials {
  background: var(--bg2);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.portal-info ul {
  list-style: none;
  padding-left: 0;
}

.portal-info li {
  padding: 4px 0;
  color: var(--text2);
}

.portal-info li:before {
  content: "✓ ";
  color: var(--success);
  font-weight: bold;
  margin-right: 8px;
}

.admin-messages-container {
  max-height: 300px;
  overflow-y: auto;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg2);
  border-radius: 8px;
}

.admin-message {
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--bg3);
}

.admin-message.from-customer {
  border-left: 4px solid var(--accent);
}

.admin-message.from-team {
  border-left: 4px solid var(--success);
}

.admin-message .message-content {
  margin-bottom: 4px;
}

.admin-message .message-meta {
  font-size: 11px;
  color: var(--text2);
}

.admin-message-form {
  background: var(--bg2);
  border-radius: 8px;
  padding: 16px;
}

/* Mobile Portal Styles */
@media (max-width: 768px) {
  .portal-header {
    padding: 12px 16px;
  }
  
  .portal-header-content {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .portal-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .portal-content {
    padding: 16px;
  }
  
  .portal-section {
    padding: 16px;
  }
  
  .status-progress {
    flex-direction: column;
    gap: 16px;
  }
  
  .progress-step {
    flex-direction: row;
    min-width: auto;
    width: 100%;
    text-align: left;
    padding: 12px;
    background: var(--bg3);
    border-radius: 8px;
  }
  
  .progress-circle {
    width: 32px;
    height: 32px;
    font-size: 14px;
    flex-shrink: 0;
  }
  
  .progress-label {
    flex: 1;
    text-align: left;
    font-size: 14px;
    margin-left: 12px;
  }
  
  .upload-options {
    flex-direction: column;
  }
  
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .message-content {
    max-width: 85%;
  }
}

/* OCR Drag & Drop Zone */
.ocr-dropzone {
  margin-bottom: 20px;
  padding: 24px 16px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: rgba(0,180,230,0.03);
}
.ocr-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(0,180,230,0.1);
  transform: scale(1.01);
}
.ocr-dropzone:hover {
  border-color: rgba(255,255,255,0.3);
}

/* ============ SMART ASSISTANT BAR ============ */
.assistant-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 6px 10px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.assistant-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 0,122,255), 0.25);
}
.assistant-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 8px 4px;
  min-width: 0;
}
.assistant-bar input::placeholder {
  color: rgba(255,255,255,0.35);
}
.assistant-bar button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.assistant-bar button:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.assistant-bar .assistant-send {
  color: var(--accent);
}
.assistant-bar .assistant-mic.recording {
  color: #ff4444;
  animation: mic-pulse 1s infinite;
}
@keyframes mic-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.assistant-response {
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.assistant-bubble {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-line;
  position: relative;
}
.assistant-bubble .assistant-icon {
  display: inline-block;
  margin-right: 6px;
  font-size: 1rem;
}
.assistant-bubble.action-weather {
  border-left: 3px solid #f0ad4e;
}
.assistant-bubble.action-message_sent {
  border-left: 3px solid #5cb85c;
}
.assistant-bubble.action-error {
  border-left: 3px solid #d9534f;
}
.assistant-bubble.action-info {
  border-left: 3px solid var(--accent);
}
.assistant-bubble .close-bubble {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
}
.assistant-bubble .close-bubble:hover {
  color: rgba(255,255,255,0.7);
}

/* ============ ASSISTANT BAR ============ */
.assistant-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 6px;
  background: var(--card-bg);
  border-radius: 28px;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.assistant-bar:focus-within {
  border-color: var(--accent);
}
.assistant-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  padding: 10px 4px;
  outline: none;
}
.assistant-bar input::placeholder {
  color: var(--text);
  opacity: 0.4;
}
.assistant-mic, .assistant-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}
.assistant-mic {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  position: relative;
}
.assistant-mic:hover {
  background: rgba(255,255,255,0.15);
}
.assistant-mic.recording {
  background: #e53935;
  color: #fff;
  animation: pulse-mic 1s infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(229,57,53,0); }
}
.assistant-send {
  background: var(--accent);
  color: #fff;
}
.assistant-send:hover {
  opacity: 0.85;
}
#assistant-response {
  margin-bottom: 16px;
}
.assistant-bubble {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 14px 40px 14px 16px;
  border-left: 4px solid var(--accent);
  font-size: 14px;
  line-height: 1.5;
}
.assistant-bubble.error {
  border-left-color: #e53935;
}
.assistant-bubble.weather {
  border-left-color: #ff9800;
}
.assistant-bubble.message_sent {
  border-left-color: #4caf50;
}
.assistant-bubble.loading {
  opacity: 0.7;
  border-left-color: var(--border);
}
.assistant-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text);
  opacity: 0.4;
  font-size: 20px;
  cursor: pointer;
}
.assistant-close:hover {
  opacity: 1;
}

/* ============ PORTAL NOTIFICATION BADGE ============ */
.portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 12px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  animation: badge-pop 0.3s ease, badge-pulse 2s infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(229,57,53,0); }
}
@keyframes badge-pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.portal-unread-banner {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,188,212,0.3);
  animation: slide-down 0.3s ease;
}
@keyframes slide-down {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.portal-unread-banner i {
  font-size: 20px;
}
.portal-unread-banner button {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.portal-unread-banner button:hover {
  background: rgba(255,255,255,0.3);
}

/* Ready for Montage pulse */
@keyframes pulse-ready {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(76,175,80,0); }
}

/* ============ INVENTORY STYLES ============ */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.inventory-card {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(0,177,230,0.1);
  transition: all 0.3s ease;
}

.inventory-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,177,230,0.1);
}

.inventory-card.critical {
  border-left-color: var(--danger) !important;
  background: linear-gradient(135deg, rgba(239,68,68,0.05), rgba(127,29,29,0.1));
}

.inventory-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.inventory-icon {
  font-size: 32px;
  min-width: 40px;
  text-align: center;
}

.inventory-name {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  color: var(--text);
}

.inventory-actions {
  display: flex;
  gap: 6px;
}

.inventory-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.inventory-quantity {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.quantity-number {
  font-size: 32px;
  font-weight: bold;
  line-height: 1;
}

.quantity-unit {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}

.inventory-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--text2);
}

.inventory-category {
  font-weight: 500;
}

.inventory-threshold {
  color: var(--text2);
}

.inventory-notes {
  font-style: italic;
  color: var(--text2);
  font-size: 13px;
}

.inventory-warning {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inventory-quick-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding-top: 12px;
  border-top: 1px solid rgba(0,177,230,0.1);
}

.inventory-quick-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 45px;
}

/* Dashboard inventory section */
.inventory-critical {
  animation: pulse-critical 2s infinite;
}

@keyframes pulse-critical {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,67,54,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(244,67,54,0); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .inventory-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .inventory-card {
    padding: 12px;
  }
  
  .inventory-header {
    flex-wrap: wrap;
  }
  
  .inventory-actions {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  
  .quantity-number {
    font-size: 28px;
  }
}

/* ---- Long-Press Delete Modal ---- */
.delete-confirm-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.delete-confirm-content {
  background: #1e1e2e; color: #fff;
  border-radius: 16px; padding: 28px;
  max-width: 360px; width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  text-align: center;
}
.delete-confirm-content h2 { margin-top: 0; color: #ef5350; font-size: 20px; }
.delete-confirm-content p { margin: 8px 0; font-size: 16px; }
.delete-confirm-content .text-muted { color: #888; font-size: 13px; }
.delete-confirm-content .button-group { display: flex; gap: 12px; margin-top: 24px; }
.delete-confirm-content .button-group .btn {
  flex: 1; padding: 12px; border: none; border-radius: 10px;
  cursor: pointer; font-size: 15px; font-weight: 600;
}
.delete-confirm-content .btn-cancel { background: #333; color: #ccc; }
.delete-confirm-content .btn-danger { background: #d32f2f; color: #fff; }
.delete-confirm-content .btn:disabled { opacity: 0.5; cursor: not-allowed; }


/* ---- Bulk Select & Delete ---- */
[data-customer-id].bulk-selected {
  background: rgba(76, 175, 80, 0.2) !important;
  border-left: 4px solid #4CAF50 !important;
  position: relative;
}
[data-customer-id].bulk-selected::after {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4CAF50;
  font-weight: bold;
  font-size: 20px;
  z-index: 2;
}
.selection-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: white;
  padding: 12px 16px;
  z-index: 10000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.selection-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.selection-count {
  font-weight: 600;
  font-size: 16px;
}
.selection-actions {
  display: flex;
  gap: 8px;
}
.selection-actions .btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.selection-actions .btn-secondary {
  background: #555;
  color: white;
}
.selection-actions .btn-danger {
  background: #d32f2f;
  color: white;
}
.selection-actions .btn:hover { opacity: 0.85; }
.selection-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* SwissSunConcept NAS */
.nas-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px; margin-bottom: 16px; border: 1px solid rgba(0,188,212,.24); border-radius: 18px; background: linear-gradient(135deg, rgba(0,188,212,.14), rgba(15,23,42,.78)); box-shadow: 0 16px 34px rgba(0,0,0,.22); }
.nas-kicker { color: #67e8f9; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.nas-hero h3 { margin: 0 0 5px; color: #fff; font-size: 26px; }
.nas-hero p { margin: 0; color: #b7c7d8; line-height: 1.45; }
.nas-status-card, .nas-search-card, .nas-file-list, .nas-note { border: 1px solid rgba(148,163,184,.18); border-radius: 14px; background: rgba(15,23,42,.72); }
.nas-status-card { margin-bottom: 14px; padding: 14px; color: #cbd5e1; }
.nas-status-card.online { border-color: rgba(34,197,94,.34); background: rgba(34,197,94,.09); }
.nas-status-card.offline { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.09); }
.nas-status-card strong { color: #fff; }
.nas-meta { margin-top: 5px; color: #9fb2c8; font-size: 12px; line-height: 1.45; }
.nas-missing { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nas-missing code, .nas-meta code { padding: 3px 6px; border-radius: 6px; background: rgba(2,6,23,.8); color: #dbeafe; border: 1px solid rgba(148,163,184,.22); }
.nas-search-card { padding: 14px; margin-bottom: 16px; }
.nas-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.nas-search-row input { width: 100%; box-sizing: border-box; background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font: inherit; }
.nas-search-hint { margin-top: 8px; color: #9fb2c8; font-size: 12px; }
.nas-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.nas-section-title { margin: 0 0 10px; color: #fff; font-size: 17px; font-weight: 800; }
.nas-file-list { min-height: 260px; max-height: 520px; overflow: auto; padding: 8px; }
.nas-empty { padding: 26px 14px; color: #8fa4bd; text-align: center; }
.nas-empty.error { color: #fca5a5; }
.nas-result-title { padding: 8px 10px 12px; color: #9fb2c8; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.nas-file-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; margin-bottom: 7px; border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(255,255,255,.035); cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.nas-file-row:hover { transform: translateY(-1px); border-color: rgba(34,211,238,.48); background: rgba(14,116,144,.16); }
.nas-file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(34,211,238,.12); color: #67e8f9; }
.nas-file-info { min-width: 0; display: grid; gap: 3px; }
.nas-file-info strong { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-file-info span { color: #94a3b8; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-open-label { color: #67e8f9; font-size: 12px; font-weight: 800; }
.nas-upload-area { padding: 26px 16px; margin-bottom: 12px; border: 2px dashed rgba(34,197,94,.7); border-radius: 16px; background: rgba(34,197,94,.08); text-align: center; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.nas-upload-area.dragover, .nas-upload-area:hover { background: rgba(34,197,94,.16); border-color: #22c55e; }
.nas-note { padding: 12px; color: #9fb2c8; font-size: 12px; line-height: 1.45; }
@media (max-width: 820px) {
  .nas-hero, .nas-grid, .nas-search-row { grid-template-columns: 1fr; display: grid; }
}

/* WhatsApp inbox */
.whatsapp-inbox {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 170px);
  min-height: 560px;
}

.whatsapp-sidebar,
.whatsapp-chat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 0;
}

.whatsapp-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.whatsapp-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.whatsapp-compose input,
.whatsapp-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.whatsapp-status {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}

.whatsapp-status .ok { color: #25d366; }
.whatsapp-status .warn { color: #fbbf24; }
.whatsapp-config-card { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.whatsapp-config-card.ready { border-color: rgba(37,211,102,.28); background: rgba(37,211,102,.08); }
.whatsapp-config-card.missing { border-color: rgba(251,191,36,.28); background: rgba(251,191,36,.08); }
.whatsapp-config-title { font-weight: 800; }
.whatsapp-config-small { color: var(--text2); font-size: 11px; line-height: 1.45; }
.whatsapp-missing-list, .whatsapp-setup-list { display: flex; flex-wrap: wrap; gap: 6px; }
.whatsapp-missing-list code, .whatsapp-setup-list code, .whatsapp-copy-line code { color: #dbeafe; background: rgba(15,23,42,.85); border: 1px solid rgba(148,163,184,.22); border-radius: 7px; padding: 4px 6px; font-size: 10px; word-break: break-all; }
.whatsapp-copy-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.whatsapp-copy-line.large code { font-size: 12px; padding: 10px; }
.whatsapp-copy-line button { border: 0; border-radius: 8px; padding: 8px 10px; color: #fff; background: #128c7e; cursor: pointer; }
.whatsapp-config-warning { padding: 8px 10px; border-radius: 9px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.28); color: #fecaca; font-size: 11px; line-height: 1.45; }

.whatsapp-thread-list {
  overflow-y: auto;
  padding: 8px;
}

.whatsapp-thread {
  position: relative;
  display: grid;
  gap: 3px;
  width: 100%;
  margin: 0 0 6px;
  padding: 11px 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.whatsapp-thread:hover,
.whatsapp-thread.active {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.35);
}

.thread-title {
  font-weight: 700;
}

.thread-phone,
.thread-preview {
  color: var(--text2);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-unread {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #07130b;
  font-size: 11px;
  font-weight: 800;
}

.whatsapp-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.whatsapp-chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.whatsapp-chat-header strong,
.whatsapp-chat-header span {
  display: block;
}

.whatsapp-chat-header span {
  margin-top: 3px;
  color: var(--text2);
  font-size: 12px;
}

.whatsapp-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 16px;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 22px 22px;
}

.whatsapp-message {
  display: flex;
}

.whatsapp-message.outbound {
  justify-content: flex-end;
}

.whatsapp-bubble {
  max-width: min(72%, 620px);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg3);
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.whatsapp-message.outbound .whatsapp-bubble {
  background: rgba(37, 211, 102, 0.16);
  border: 1px solid rgba(37, 211, 102, 0.28);
}

.whatsapp-message-meta {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  color: var(--text2);
  font-size: 11px;
}

.whatsapp-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.whatsapp-empty {
  color: var(--text2);
  padding: 18px;
  text-align: center;
}

@media (max-width: 760px) {
  .whatsapp-inbox {
    grid-template-columns: 1fr;
    height: auto;
  }

  .whatsapp-sidebar,
  .whatsapp-chat {
    min-height: 320px;
  }

  .whatsapp-messages {
    min-height: 360px;
  }

  .whatsapp-bubble {
    max-width: 88%;
  }
}

/* ============ VOICE RECORDING OVERLAY ============ */
.voice-recording-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.voice-recording-overlay.active {
  opacity: 1;
}
.voice-recording-container {
  text-align: center;
  color: #fff;
  padding: 40px;
}
.recording-indicator {
  margin-bottom: 20px;
}
.recording-dot {
  width: 20px;
  height: 20px;
  background: #e53935;
  border-radius: 50%;
  margin: 0 auto;
  animation: recording-pulse 1s infinite;
}
@keyframes recording-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
.waveform {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  height: 40px;
  margin-bottom: 20px;
}
.wave-bar {
  width: 4px;
  background: var(--accent, #4fc3f7);
  border-radius: 2px;
  animation: wave 0.8s ease-in-out infinite;
}
.wave-bar:nth-child(1) { animation-delay: 0s; height: 10px; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 20px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 30px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 40px; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; height: 30px; }
.wave-bar:nth-child(6) { animation-delay: 0.1s; height: 20px; }
.wave-bar:nth-child(7) { animation-delay: 0s; height: 10px; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
.recording-text {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.recording-subtitle {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 16px;
}
.recording-timer {
  font-size: 1.5rem;
  font-family: monospace;
  margin-bottom: 24px;
  color: #e53935;
}
.stop-recording-btn {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 32px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.stop-recording-btn:hover {
  background: #c62828;
}

/* Long-press indicator */
.long-press-indicator {
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: var(--accent, #4fc3f7);
  animation: lp-spin 2s linear;
  pointer-events: none;
}
.long-press-indicator.active {
  border-color: #e53935;
  animation: none;
}
@keyframes lp-spin {
  to { transform: rotate(360deg); }
}
.long-press-hint {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  z-index: 100;
  pointer-events: none;
}

/* Voice processing/success/error */
.voice-processing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--text);
  opacity: 0.8;
}
.processing-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent, #4fc3f7);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.voice-success {
  padding: 10px 14px;
  background: rgba(76,175,80,0.15);
  border-left: 3px solid #4caf50;
  border-radius: 8px;
  color: #a5d6a7;
  margin: 8px 0;
  animation: fadeInUp 0.3s;
}
.voice-error {
  padding: 10px 14px;
  background: rgba(244,67,54,0.15);
  border-left: 3px solid #f44336;
  border-radius: 8px;
  color: #ef9a9a;
  margin: 8px 0;
  animation: fadeInUp 0.3s;
}
.mic-permission-prompt {
  padding: 12px;
  background: rgba(255,152,0,0.1);
  border-left: 3px solid #ff9800;
  border-radius: 8px;
  color: var(--text);
  margin: 8px 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ========== WICHTIG-CARDS MODERN REDESIGN ========== */

/* GLOBAL FIX: Remove all problematic outlines */
#content > * {
  outline: none !important;
  box-shadow: none !important;
}

#content div {
  outline: none !important;
}

/* Wichtig Card Container */
.wichtig-card {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  outline: none !important;
  box-shadow: none !important;
}

.wichtig-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.wichtig-card:hover::before {
  opacity: 1;
}

.wichtig-card button {
  transition: all 0.2s ease;
}

.wichtig-card button:hover {
  transform: scale(1.08);
  opacity: 1 !important;
}

.wichtig-card button:active {
  transform: scale(0.95);
}

/* Wichtig Customer Card */
.wichtig-customer-card {
  position: relative;
  overflow: hidden;
}

.wichtig-customer-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
  pointer-events: none;
}

.wichtig-customer-card:hover::after {
  left: 100%;
}

/* Tab Animations */
.tab-btn-modern {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Empty State */
.empty-wichtig-state {
  padding: 40px 20px;
  text-align: center;
  background: rgba(71, 85, 105, 0.1);
  border: 2px dashed rgba(255, 87, 34, 0.2);
  border-radius: 12px;
  animation: fadeIn 0.4s ease-out;
}

.empty-wichtig-state i {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInCard {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Priorität Badges */
.priority-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
}

.priority-critical {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.priority-warning {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.priority-info {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* File/Image Display */
.wichtig-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.wichtig-file-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wichtig-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 87, 34, 0.2);
}

.wichtig-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 87, 34, 0.2);
}

/* Responsive Grid für Cards */
@media (max-width: 768px) {
  .wichtig-card {
    margin-bottom: 10px;
  }
  
  .wichtig-card button {
    font-size: 11px;
    padding: 6px;
  }
}

@media (min-width: 769px) {
  .wichtig-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }
}

/* Foerdercheck Dashboard */
.funding-check-card { margin-top: 16px; padding: 18px; border: 1px solid rgba(0,188,212,.28); border-radius: 18px; background: linear-gradient(135deg, rgba(0,188,212,.14), rgba(17,24,39,.88)); box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.funding-check-card.loading { color: var(--text2); }
.funding-check-header { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.funding-kicker { color: #67e8f9; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
.funding-check-card h3 { margin: 0 0 5px; color: #fff; font-size: 22px; }
.funding-check-card p { margin: 0; color: #b7c7d8; line-height: 1.45; }
.funding-summary { display: grid; grid-template-columns: repeat(2, minmax(72px, 1fr)); gap: 8px; min-width: 260px; }
.funding-summary > div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); text-align: center; }
.funding-summary strong, .funding-modal-stats strong { display: block; color: #22d3ee; font-size: 24px; line-height: 1; }
.funding-summary span, .funding-modal-stats span { color: #a9bad0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.funding-summary button { grid-column: span 2; }
.funding-disclaimer { display: flex; gap: 8px; align-items: center; margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: rgba(251,191,36,.11); border: 1px solid rgba(251,191,36,.24); color: #fde68a; font-size: 13px; }
.funding-list { display: grid; gap: 10px; }
.funding-customer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid rgba(148,163,184,.22); border-radius: 14px; background: rgba(15,23,42,.72); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.funding-customer-row:hover { transform: translateY(-1px); border-color: rgba(34,211,238,.55); background: rgba(14,116,144,.18); }
.funding-customer-row.checked { opacity: .74; }
.funding-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #fff; }
.funding-priority { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.funding-priority.high { background: rgba(239,68,68,.18); color: #fca5a5; border: 1px solid rgba(239,68,68,.35); }
.funding-priority.medium { background: rgba(245,158,11,.18); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); }
.funding-priority.low { background: rgba(59,130,246,.18); color: #93c5fd; border: 1px solid rgba(59,130,246,.35); }
.funding-priority.checked { background: rgba(34,197,94,.18); color: #86efac; border: 1px solid rgba(34,197,94,.35); }
.funding-row-location { margin-top: 5px; color: #9fb2c8; font-size: 13px; }
.funding-row-location.missing { color: #fbbf24; }
.funding-hint-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.funding-hint-tags span { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: #cbd5e1; font-size: 12px; }
.funding-hint-tags .funding-tag-warning { background: rgba(245,158,11,.16); border: 1px solid rgba(245,158,11,.28); color: #fbbf24; }
.funding-hint-tags .funding-tag-auto { background: rgba(34,197,94,.16); border: 1px solid rgba(34,197,94,.28); color: #86efac; }
.funding-row-actions { display: flex; align-items: center; gap: 8px; }
.funding-checked { display: inline-flex; align-items: center; gap: 6px; color: #86efac; font-weight: 700; }
.funding-empty { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.05); color: #a9bad0; text-align: center; }
.funding-modal, .funding-detail-modal { max-width: 980px; width: min(94vw, 980px); max-height: 86vh; overflow: auto; }
.funding-modal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.funding-modal-stats > div { padding: 12px; border-radius: 14px; background: rgba(0,188,212,.08); border: 1px solid rgba(0,188,212,.18); text-align: center; }
.funding-modal-section { margin-top: 16px; display: grid; gap: 10px; }
.funding-modal-section h3 { margin: 0 0 2px; color: #fff; }
.funding-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.funding-detail-meta > div { padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: #cbd5e1; font-size: 13px; }
.funding-detail-hints { display: grid; gap: 10px; }
.funding-detail-hint { padding: 13px; border-radius: 14px; background: rgba(15,23,42,.76); border: 1px solid rgba(148,163,184,.18); }
.funding-detail-hint strong { color: #fff; }
.funding-detail-hint p { margin: 7px 0; color: #cbd5e1; line-height: 1.45; }
.funding-detail-hint a { color: #22d3ee; text-decoration: none; font-weight: 700; }
.funding-source-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #22d3ee; font: inherit; font-weight: 800; cursor: pointer; }
.funding-source-button:hover, .funding-source-button:focus-visible { color: #67e8f9; text-decoration: underline; outline: none; }
.funding-auto-check { margin: 10px 0 12px; padding: 12px; border-radius: 12px; border: 1px solid rgba(34,197,94,.28); background: rgba(20,83,45,.22); }
.funding-auto-check.missing { border-color: rgba(245,158,11,.28); background: rgba(120,53,15,.2); }
.funding-auto-check.pending, .funding-auto-check.loading { border-color: rgba(34,211,238,.3); background: rgba(8,47,73,.25); }
.funding-auto-check.found { border-color: rgba(34,197,94,.4); background: rgba(20,83,45,.28); }
.funding-auto-check.not_found { border-color: rgba(148,163,184,.3); background: rgba(15,23,42,.52); }
.funding-auto-check.error { border-color: rgba(239,68,68,.34); background: rgba(127,29,29,.22); }
.funding-auto-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.funding-auto-head strong { color: #dcfce7; }
.funding-auto-head span { color: #86efac; font-weight: 800; }
.funding-auto-check.missing .funding-auto-head strong, .funding-auto-check.missing .funding-auto-head span { color: #fbbf24; }
.funding-auto-check.error .funding-auto-head strong, .funding-auto-check.error .funding-auto-head span { color: #fca5a5; }
.funding-auto-check p { margin: 8px 0; }
.funding-auto-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.funding-auto-meta span { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cbd5e1; font-size: 12px; }
.funding-auto-check ul { margin: 8px 0 0 18px; padding: 0; color: #dbeafe; line-height: 1.5; }
.funding-auto-snippets { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.funding-auto-snippets strong { color: #fff; }
.funding-auto-run { margin-top: 10px; }
.funding-ai-panel, .funding-tax-panel { display: grid; gap: 12px; align-items: center; margin: 12px 0; padding: 14px; border-radius: 14px; border: 1px solid rgba(34,211,238,.22); background: rgba(8,47,73,.35); }
.funding-ai-panel { grid-template-columns: minmax(0, 1fr) auto; }
.funding-ai-panel strong, .funding-tax-panel strong { color: #fff; }
.funding-ai-panel p, .funding-tax-panel p { margin: 5px 0 0; color: #cbd5e1; line-height: 1.45; }
.funding-tax-panel.critical { border-color: rgba(239,68,68,.35); background: rgba(127,29,29,.25); }
.funding-data-gaps { margin-top: 9px; color: #fbbf24; font-weight: 700; font-size: 13px; }
.funding-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) {
  .funding-check-header, .funding-customer-row { grid-template-columns: 1fr; }
  .funding-summary, .funding-modal-stats { grid-template-columns: repeat(2, 1fr); min-width: 0; }
  .funding-ai-panel { grid-template-columns: 1fr; }
  .funding-row-actions { justify-content: stretch; }
  .funding-row-actions .btn { flex: 1; }
}

@media (max-width: 820px) {
  .receipt-tool-grid { grid-template-columns: 1fr !important; }
  .receipt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Obsidian Projektbericht-Import */
.project-report-modal { max-width: 820px; width: 94%; max-height: 84vh; overflow: hidden; }
.project-report-modal .modal-body { max-height: 70vh; overflow: auto; }
.project-report-customer { background: rgba(0,188,212,.10); border: 1px solid rgba(0,188,212,.28); border-radius: 12px; color: #d8fbff; margin-bottom: 14px; padding: 12px; }
.project-report-candidates { display: grid; gap: 10px; }
.project-report-candidate { align-items: center; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); border-radius: 14px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
.project-report-title { color: #fff; font-weight: 800; margin-bottom: 4px; }
.project-report-path { color: #9fb2c8; font-size: 12px; overflow-wrap: anywhere; }
.project-report-meta { color: #66e7ff; font-size: 12px; margin-top: 5px; }
.project-report-empty { background: rgba(255,152,0,.10); border: 1px solid rgba(255,152,0,.35); border-radius: 12px; color: #ffcc80; line-height: 1.45; padding: 14px; }
@media (max-width: 620px) {
  .project-report-candidate { grid-template-columns: 1fr; }
}

/* DC-Abnahmeprotokoll */
.dc-acceptance-app { display: grid; gap: 16px; }
.dc-toolbar, .dc-data-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.dc-toolbar h1 { margin: 0 0 6px; color: var(--accent); font-size: 24px; }
.dc-toolbar p, .dc-status { color: var(--text2); margin: 0; }
.dc-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 10px; align-items: end; margin-top: 14px; }
.dc-file-picker span, .dc-data-panel label { display: block; margin-bottom: 6px; color: var(--text2); font-size: 12px; font-weight: 700; }
.dc-file-picker input, .dc-data-panel input, .dc-data-panel textarea { width: 100%; box-sizing: border-box; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit; }
.dc-status { min-height: 18px; margin-top: 10px; font-size: 13px; }
.dc-editor { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 210mm); gap: 18px; align-items: start; }
.dc-data-panel { position: sticky; top: 12px; }
.dc-data-panel h2 { margin: 0 0 12px; color: var(--accent); font-size: 18px; }
.dc-data-grid { display: grid; gap: 10px; }
.dc-protocol-page { position: relative; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 10mm 18mm 31mm; background: #fff; color: #1d2528; box-shadow: 0 10px 30px rgba(0,0,0,.28); font-family: Arial, Helvetica, sans-serif; font-size: 7.8pt; line-height: 1.25; }
.dc-doc-header { margin-bottom: 3mm; border-bottom: .7mm solid #f4a11b; padding-bottom: 2.5mm; }
.dc-header-top { display: grid; grid-template-columns: 34mm 1fr 15mm; gap: 5mm; align-items: center; }
.dc-logo-card { height: 22mm; display: flex; align-items: center; justify-content: center; border: 1px solid #d8e0e3; border-radius: 3mm; background: #f9fbfb; }
.dc-logo { width: 28mm; max-height: 16mm; object-fit: contain; }
.dc-doc-kicker { color: #176b5a; font-size: 7pt; font-weight: 800; letter-spacing: .6pt; text-transform: uppercase; }
.dc-doc-badge { width: 14mm; height: 14mm; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 50%; background: #176b5a; color: #fff; font-size: 8pt; font-weight: 800; line-height: 1; box-shadow: 0 0 0 1.2mm #eaf3f1; }
.dc-doc-badge span { color: #fff !important; font-size: 6pt !important; font-weight: 700 !important; letter-spacing: .6pt; }
.dc-brand, .dc-protocol-page h2 { color: #176b5a; font-weight: 700; }
.dc-protocol-page h1 { margin: .8mm 0 .8mm; font-size: 15pt; line-height: 1.05; color: #1d2528; }
.dc-protocol-page h1 span, .dc-protocol-page h2 span, .dc-protocol-page td span, .dc-protocol-page p span, .dc-protocol-page label span { color: #657377; font-size: .82em; font-weight: 400; }
.dc-subtitle, .dc-hint { color: #657377; margin: .6mm 0 0; }
.dc-project-strip { display: grid; grid-template-columns: 1.05fr 1.45fr .7fr 1fr; gap: 1.2mm; margin-top: 2.5mm; }
.dc-project-strip > div { min-height: 9mm; padding: 1.2mm 1.5mm; border: 1px solid #d8e0e3; border-radius: 2mm; background: #f5f8f8; overflow: hidden; }
.dc-project-strip span { display: block; color: #657377; font-size: 5.7pt; font-weight: 800; text-transform: uppercase; letter-spacing: .35pt; }
.dc-project-strip strong { display: block; margin-top: .5mm; color: #1d2528; font-size: 7pt; line-height: 1.15; overflow-wrap: anywhere; }
.dc-hint { font-size: 6.2pt; padding: 1.2mm 1.5mm; border-left: .8mm solid #176b5a; background: #f5f8f8; border-radius: 1.5mm; }
.dc-protocol-page h2 { margin: 2.5mm 0 1.1mm; font-size: 9pt; }
.dc-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid #d8e0e3; border-radius: 3mm; overflow: hidden; }
.dc-info-box { min-height: 10mm; padding: 1mm 1.7mm; border-right: 1px solid #d8e0e3; border-bottom: 1px solid #d8e0e3; background: #f5f8f8; }
.dc-info-box:nth-child(2n) { border-right: 0; }
.dc-info-box label { display: block; margin: 0 0 .4mm; color: #657377; font-size: 6.5pt; font-weight: 700; }
.dc-info-box input, .dc-measure-table input, .dc-comment-box { width: 100%; box-sizing: border-box; border: 0; background: transparent; color: #1d2528; font: inherit; }
.dc-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #d8e0e3; border-radius: 3mm; overflow: hidden; }
.dc-table th, .dc-table td { padding: .85mm 1.4mm; border-right: 1px solid #d8e0e3; border-bottom: 1px solid #d8e0e3; text-align: left; vertical-align: middle; }
.dc-table th { color: #657377; background: #f5f8f8; font-size: 6.5pt; }
.dc-table td:last-child, .dc-table th:last-child { border-right: 0; }
.dc-table tr:last-child td { border-bottom: 0; }
.dc-table input[type="checkbox"] { width: 3.8mm; height: 3.8mm; accent-color: #176b5a; }
.dc-table .dc-nr, .dc-table .dc-tick, .dc-table td:first-child, .dc-table td:nth-child(3), .dc-table td:nth-child(4) { text-align: center; }
.dc-comment-box { min-height: 8mm; padding: 1mm 1.7mm; border: 1px solid #d8e0e3; border-radius: 3mm; resize: vertical; }
.dc-signature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid #d8e0e3; border-radius: 3mm; overflow: hidden; }
.dc-signature-grid > div:first-child { border-right: 1px solid #d8e0e3; }
.dc-signature-grid canvas { display: block; width: 100%; height: 10.5mm; background: #fff; touch-action: none; cursor: crosshair; }
.dc-signature-grid label { display: block; padding: .9mm 1.7mm; color: #657377; background: #f5f8f8; border-top: 1px solid #d8e0e3; font-size: 6.8pt; font-weight: 700; }
.dc-footer { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; background: #2598d1; font-size: 8pt; font-weight: 700; line-height: 1.05; }
.dc-footer-stripe { height: 2mm; background: #f4a11b; }
.dc-footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; min-height: 24mm; padding: 4mm 18mm; gap: 9mm; }
.dc-footer-grid > div + div { border-left: 1mm solid #f4a11b; padding-left: 9mm; }
@media (max-width: 1080px) {
  .dc-controls, .dc-editor { grid-template-columns: 1fr; }
  .dc-data-panel { position: static; }
  .dc-protocol-page { width: 100%; min-height: auto; padding: 14px; }
  .dc-footer { position: static; margin: 14px -14px -14px; }
}
@media (max-width: 620px) {
  .dc-header-top, .dc-project-strip, .dc-info-grid, .dc-signature-grid, .dc-footer-grid { grid-template-columns: 1fr; }
  .dc-info-box, .dc-signature-grid > div:first-child, .dc-footer-grid > div + div { border-right: 0; border-left: 0; }
  .dc-doc-badge { display: none; }
}
@media print {
  @page { size: A4; margin: 0; }
  body.dc-print-mode { background: #fff !important; }
  body.dc-print-mode .app-header,
  body.dc-print-mode .bottom-nav,
  body.dc-print-mode .no-print,
  body.dc-print-mode .dc-data-panel,
  body.dc-print-mode .dc-toolbar { display: none !important; }
  body.dc-print-mode #content { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  body.dc-print-mode .dc-acceptance-app,
  body.dc-print-mode .dc-editor { display: block !important; }
  body.dc-print-mode .dc-protocol-page { width: 210mm; min-height: 297mm; padding: 10mm 18mm 31mm; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
