/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
main.container { padding-top: 28px; padding-bottom: 60px; min-height: 60vh; }

/* Header */
.site-header {
  background: var(--grad-dark);
  color: var(--dp-white);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-logo img { height: 46px; display: block; }
.header-title { display: flex; flex-direction: column; line-height: 1.2; }
.header-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dp-white);
}
.header-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--dp-red-100);
}
.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.demo-pill {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dp-white);
  background: rgba(249, 249, 251, 0.14);
  border: 1px solid rgba(249, 249, 251, 0.3);
  border-radius: var(--radius-pill);
  padding: 0.25em 0.9em;
}
.role-switcher {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--dp-indigo-100);
  background: var(--dp-white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.45em 1em;
  cursor: pointer;
}

/* Glocke */
.bell-wrap { position: relative; }
.bell-btn {
  background: rgba(249, 249, 251, 0.14);
  border: 1px solid rgba(249, 249, 251, 0.3);
  color: var(--dp-white);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bell-btn:hover { background: rgba(249, 249, 251, 0.24); }
.bell-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--dp-red-100);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: 48px;
  width: 340px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  color: var(--dp-black);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  z-index: 60;
  padding: 8px 0;
}
.notif-item {
  padding: 10px 16px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--dp-indigo-20);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--dp-purple-10); }
.notif-item .small { display: block; margin-top: 2px; }
.notif-empty { padding: 18px 16px; font-size: 0.85rem; color: var(--dp-indigo-60); text-align: center; }

/* Nav */
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  gap: 8px;
}
.site-nav a {
  color: rgba(249, 249, 251, 0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35em 1.1em;
  border-radius: var(--radius-pill);
}
.site-nav a.active {
  background: rgba(249, 249, 251, 0.16);
  color: var(--dp-white);
  font-weight: 600;
}
.site-nav a:hover { color: var(--dp-white); }

/* Footer */
.site-footer {
  background: var(--dp-indigo-100);
  color: var(--dp-indigo-40);
  font-size: 0.78rem;
  padding: 18px 0;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-footer .btn-link { color: var(--dp-indigo-40); }
.site-footer .btn-link:hover { color: var(--dp-white); }

/* Seitenkopf */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1, .page-head h2 { margin-bottom: 0; }

/* Filter-Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--dp-indigo-80);
  background: #fff;
  border: 1.5px solid var(--dp-indigo-20);
  border-radius: var(--radius-pill);
  padding: 0.35em 1.1em;
  cursor: pointer;
}
.tab.active {
  background: var(--dp-indigo-100);
  border-color: var(--dp-indigo-100);
  color: var(--dp-white);
  font-weight: 600;
}

/* Karten */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.card-click { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-click:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(51, 47, 116, 0.14);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.card-top h3 { margin: 0; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.82rem;
  color: var(--dp-indigo-80);
  margin-top: 10px;
}
.card-meta span strong { color: var(--dp-indigo-100); }

.empty-state {
  text-align: center;
  color: var(--dp-indigo-60);
  padding: 50px 20px;
  background: var(--dp-beige-20);
  border-radius: var(--radius-card);
  border: 1.5px dashed var(--dp-indigo-20);
}

/* Detail-Layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 820px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dp-red-100);
  margin: 18px 0 6px;
}
.section-label:first-child { margin-top: 0; }

ul.plain {
  margin: 4px 0;
  padding-left: 0;
  list-style: none;
}
ul.plain li {
  padding: 3px 0 3px 26px;
  position: relative;
}
ul.plain li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--dp-red-100);
  color: #fff;
  font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}

/* Kundendaten-Panels */
.kunde-box {
  border-left: 4px solid var(--dp-indigo-100);
  background: var(--dp-beige-20);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 14px 18px;
  margin: 8px 0;
}
.kunde-box.masked {
  border-left-color: var(--dp-purple-80);
  background: var(--dp-purple-10);
}
.mask-hint {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dp-purple-100);
  background: var(--dp-purple-20);
  padding: 0.2em 0.9em;
  border-radius: var(--radius-pill);
  margin-top: 6px;
}
.reveal-box {
  border-left: 4px solid var(--dp-red-100);
  background: var(--dp-red-20);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 14px 18px;
  margin: 8px 0;
}

/* Tabellen */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dp-indigo-60);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--dp-indigo-20);
}
table.data td {
  padding: 10px;
  border-bottom: 1px solid var(--dp-indigo-20);
  vertical-align: top;
}
table.data tr.best td { background: var(--dp-purple-10); }
table.data tr:last-child td { border-bottom: none; }

/* Formulare */
form .form-row { margin-bottom: 14px; }
label.field-label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--dp-indigo-100);
  margin-bottom: 4px;
}
input[type="text"], input[type="number"], input[type="date"], input[type="tel"], textarea, select.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dp-black);
  background: #fff;
  border: 1.5px solid var(--dp-indigo-20);
  border-radius: 10px;
  padding: 0.55em 0.9em;
}
input:focus, textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--dp-purple-80);
  box-shadow: 0 0 0 3px var(--dp-purple-10);
}
textarea { resize: vertical; min-height: 80px; }
.form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) { .form-cols { grid-template-columns: 1fr; } }
.dyn-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.dyn-row input:first-child { flex: 1; }
.dyn-row input.qty { width: 80px; }
.dyn-remove {
  background: none;
  border: none;
  color: var(--dp-red-100);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 6px;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  align-items: center;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--dp-indigo-20);
}
.timeline li {
  position: relative;
  padding: 0 0 14px 28px;
  font-size: 0.82rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 1px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dp-purple-80);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--dp-purple-40);
}
.timeline li:first-child::before { background: var(--dp-red-100); box-shadow: 0 0 0 2px var(--dp-red-40); }
.timeline .ts { color: var(--dp-indigo-60); font-size: 0.72rem; display: block; }

/* Foto-Grid */
.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.foto-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid var(--dp-indigo-20);
  transition: transform 0.12s ease;
}
.foto-grid img:hover { transform: scale(1.03); }

/* Hinweis-Banner */
.banner {
  border-radius: var(--radius-card);
  padding: 12px 18px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.banner-warn {
  background: var(--dp-red-20);
  border-left: 4px solid var(--dp-red-100);
  color: var(--dp-black);
}
.banner-info {
  background: var(--dp-purple-10);
  border-left: 4px solid var(--dp-purple-80);
  color: var(--dp-black);
}
.banner-success {
  background: var(--dp-beige-60);
  border-left: 4px solid var(--dp-indigo-100);
  color: var(--dp-black);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 34, 43, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  max-width: 520px;
  width: 100%;
  padding: 26px 28px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-foto {
  max-width: 860px;
  padding: 14px;
}
.modal-foto img { width: 100%; border-radius: 10px; display: block; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Toast */
#toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: var(--dp-indigo-100);
  color: var(--dp-white);
  font-size: 0.86rem;
  padding: 0.7em 1.6em;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-modal);
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Statuszeile Angebot */
.offer-own {
  background: var(--dp-purple-10);
  border-radius: var(--radius-card);
  padding: 14px 18px;
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  .header-title { display: none; }
  .demo-pill { display: none; }
}

/* Login */
.login-wrap {
  display: flex;
  justify-content: center;
  padding: 60px 0 40px;
}
.login-card {
  width: 100%;
  max-width: 420px;
}

/* User-Chip im Header */
.user-chip {
  color: var(--dp-white);
  font-size: 0.85rem;
  font-weight: 500;
}
.user-chip .user-role {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dp-red-100);
}
.btn-logout {
  color: var(--dp-white);
  border-color: rgba(249, 249, 251, 0.4);
}
.btn-logout:hover { border-color: var(--dp-white); }
