* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f5f7fa;
  color: #172033;
}
.hidden {
  display: none !important;
}
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 430px;
  background: white;
  border-radius: 18px;
  padding: 38px;
  box-shadow: 0 20px 60px rgba(20, 30, 50, 0.08);
}
.brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #172033;
  color: white;
  font-weight: 800;
  letter-spacing: -1px;
}
.brand h1 {
  margin: 0;
  font-size: 20px;
}
.brand span {
  color: #7b8495;
  font-size: 13px;
}
h2 {
  margin: 30px 0 8px;
}
.muted {
  color: #7b8495;
}
form {
  margin-top: 26px;
}
label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14px;
  font-weight: 600;
}
input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dce1e8;
  border-radius: 9px;
  font-size: 15px;
  outline: none;
}
input:focus {
  border-color: #172033;
}
button {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  background: #172033;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
form button {
  width: 100%;
  margin-top: 24px;
}
button:hover {
  opacity: 0.9;
}
.error {
  margin-top: 12px;
  color: #c0392b;
  font-size: 14px;
}
.register-link {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
}
.register-link a {
  color: #172033;
  font-weight: 700;
}
.dashboard {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 235px;
  background: #111827;
  color: white;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  padding: 0 8px 30px;
}
.sidebar-brand .logo {
  background: white;
  color: #111827;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  color: #aeb7c6;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}
nav a:hover,
nav a.active {
  background: #1f2937;
  color: white;
}
.logout {
  margin-top: auto;
  background: #1f2937;
  color: #cbd5e1;
}
.main {
  flex: 1;
  padding: 34px;
  max-width: 1500px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.topbar h1 {
  margin: 0 0 5px;
}
.user-badge {
  background: white;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat-card,
.panel {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 5px 25px rgba(20, 30, 50, 0.04);
}
.stat-card span {
  display: block;
  color: #7b8495;
  font-size: 13px;
}
.stat-card strong {
  display: block;
  font-size: 30px;
  margin: 12px 0 5px;
}
.stat-card small {
  color: #9aa3b1;
}
.stat-card .status {
  font-size: 18px;
}
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 {
  margin: 0 0 5px;
}
.panel-header p {
  margin: 0;
  font-size: 14px;
}
.empty-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #7b8495;
  padding: 30px;
}
.empty-state h3 {
  color: #172033;
  margin-bottom: 5px;
}
.empty-state p {
  max-width: 430px;
  line-height: 1.5;
}
.empty-icon {
  font-size: 42px;
  color: #aeb7c6;
}
.empty-state.compact {
  min-height: 220px;
}
@media (max-width: 900px) {
  .sidebar {
    width: 190px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .dashboard {
    display: block;
  }
  .sidebar {
    width: 100%;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .main {
    padding: 20px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-card {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.modal-header h2 {
  margin: 0 0 5px;
}
.modal-close {
  background: transparent;
  color: #7b8495;
  font-size: 28px;
  padding: 0 8px;
}
.modal-close:hover {
  background: #f1f3f6;
  color: #172033;
}
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dce1e8;
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
textarea {
  resize: vertical;
}
textarea:focus,
select:focus {
  border-color: #172033;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-label input {
  width: auto;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.secondary-button {
  background: #eef1f5;
  color: #172033;
}
.property-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.property-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e5e8ed;
  border-radius: 12px;
  padding: 14px;
}
.property-placeholder {
  width: 90px;
  height: 75px;
  border-radius: 9px;
  background: #eef1f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #9aa3b1;
  flex-shrink: 0;
}
.property-info {
  flex: 1;
}
.property-info h3 {
  margin: 0 0 5px;
}
.property-location {
  margin: 0 0 8px;
  color: #7b8495;
  font-size: 14px;
}
.property-details {
  display: flex;
  gap: 14px;
  color: #7b8495;
  font-size: 13px;
}
.property-price {
  display: block;
  margin-top: 8px;
}
.property-status {
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.property-status.active {
  background: #e8f7ee;
  color: #18864b;
}
.property-status.inactive {
  background: #f1f3f5;
  color: #7b8495;
}
@media (max-width: 600px) {
  .modal-card {
    padding: 22px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .property-card {
    align-items: flex-start;
  }
  .property-status {
    display: none;
  }
}
.property-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.delete-property-button {
  background: transparent;
  color: #b42318;
  border: 1px solid #f0c7c3;
  padding: 7px 11px;
  font-size: 12px;
}
.delete-property-button:hover {
  background: #fff1f0;
  border-color: #e5a7a1;
}
@media (max-width: 600px) {
  .property-actions {
    align-items: flex-start;
  }
}
.property-media-section {
  width: 100%;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e8ebef;
}
.media-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.media-header span {
  color: #8a93a1;
  font-size: 12px;
}
.property-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.property-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: #eef1f5;
}
.property-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.delete-media-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(20, 25, 35, 0.78);
  color: white;
  border: none;
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 18px;
  line-height: 28px;
}
.delete-media-button:hover {
  background: #b42318;
}
.no-media {
  color: #8a93a1;
  font-size: 13px;
  padding: 10px 0;
}
.property-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.property-pdf {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f6f7f9;
  border-radius: 9px;
}
.property-pdf a {
  color: #172033;
  text-decoration: none;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.property-pdf .delete-media-button {
  position: static;
  flex-shrink: 0;
}
.media-upload-buttons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #dce1e8;
  border-radius: 9px;
  background: white;
  color: #172033;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.upload-button:hover {
  background: #f6f7f9;
}
.upload-button input {
  display: none;
}
.pdf-upload-button {
  background: #f8f9fb;
}
.upload-status {
  min-height: 18px;
  margin-top: 8px;
  color: #7b8495;
  font-size: 12px;
}
@media (max-width: 700px) {
  .property-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
  }
  .property-placeholder {
    width: 70px;
    height: 60px;
  }
  .property-info {
    min-width: 0;
  }
  .property-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .property-media-section {
    grid-column: 1 / -1;
  }
  .property-photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .media-upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .upload-button {
    width: 100%;
    box-sizing: border-box;
  }
}
@media (max-width: 420px) {
  .property-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-upload-buttons {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   IMMOBILIEN-DASHBOARD – LAYOUT OVERRIDE
   ========================================================= */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.content-grid > .panel:first-child {
  width: 100%;
  box-sizing: border-box;
}
.content-grid > .panel:nth-child(2) {
  width: 100%;
  box-sizing: border-box;
}
/* Immobilienkarte */
.property-list {
  width: 100%;
}
.property-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 20px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
}
/* großes Immobilienbild */
.property-placeholder {
  width: 180px;
  height: 130px;
  border-radius: 12px;
  background: #eef1f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #9aa3b1;
  flex-shrink: 0;
}
/* Immobilieninformationen */
.property-info {
  min-width: 0;
  padding-top: 2px;
}
.property-info h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 750;
  color: #111827;
  word-break: normal;
}
.property-location {
  margin: 0 0 12px;
  color: #687386;
  font-size: 15px;
}
.property-details {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #687386;
  font-size: 14px;
}
.property-price {
  display: block;
  margin-top: 12px;
  font-size: 18px;
  color: #111827;
}
/* Status + Löschen nebeneinander */
.property-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.property-status {
  white-space: nowrap;
}
.delete-property-button {
  white-space: nowrap;
}
/* Medien über die komplette Immobilienkarte */
.property-media-section {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid #e8ebef;
}
.media-header {
  margin-bottom: 14px;
}
.property-photo-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.property-photo {
  min-width: 0;
}
/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 900px) {
  .property-card {
    grid-template-columns: 140px minmax(0, 1fr) auto;
    column-gap: 18px;
  }
  .property-placeholder {
    width: 140px;
    height: 110px;
  }
  .property-photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 700px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .property-card {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 14px;
    padding: 15px;
  }
  .property-placeholder {
    width: 90px;
    height: 80px;
    font-size: 30px;
  }
  .property-info h3 {
    font-size: 20px;
  }
  .property-location {
    font-size: 14px;
  }
  .property-details {
    gap: 10px;
    font-size: 13px;
  }
  .property-price {
    font-size: 16px;
  }
  .property-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-direction: row;
  }
  .property-media-section {
    grid-column: 1 / -1;
  }
  .property-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* =========================================================
   SMALL MOBILE
   ========================================================= */
@media (max-width: 420px) {
  .property-card {
    grid-template-columns: 75px minmax(0, 1fr);
    padding: 12px;
  }
  .property-placeholder {
    width: 75px;
    height: 70px;
  }
  .property-info h3 {
    font-size: 18px;
  }
  .property-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* =========================================================
   TITELBILD / COVER FOTO
   ========================================================= */
.property-cover {
  width: 180px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef1f5;
  position: relative;
  flex-shrink: 0;
}
.property-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.property-photo.is-cover {
  box-shadow: 0 0 0 2px #22a06b;
}
.cover-photo-button {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(20, 25, 35, 0.65);
  color: transparent;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.cover-photo-button:hover {
  background: rgba(20, 25, 35, 0.9);
}
.cover-photo-button.selected {
  background: #22a06b;
  color: white;
  border-color: white;
}
.cover-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #22a06b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}
/* =========================================================
   COVER RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .property-cover {
    width: 140px;
    height: 110px;
  }
}
@media (max-width: 700px) {
  .property-cover {
    width: 90px;
    height: 80px;
  }
}
@media (max-width: 420px) {
  .property-cover {
    width: 75px;
    height: 70px;
  }
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.55);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.modal-header h2 {
  margin: 0 0 5px;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #687386;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-card label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: #344054;
}
.modal-card input,
.modal-card textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  font: inherit;
}
.modal-card textarea {
  resize: vertical;
}
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 4px !important;
}
.checkbox-label input {
  width: auto;
  margin: 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.secondary-button {
  background: #eef1f5 !important;
  color: #172033 !important;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-card {
    padding: 20px;
  }
}
.property-status-button {
  border: none;
  font: inherit;
  cursor: pointer;
}
.property-status-button.active {
  cursor: pointer;
}
.property-status-button.inactive {
  background: #fde7e7 !important;
  color: #b42318 !important;
  cursor: pointer;
}
.property-status-button:hover {
  opacity: 0.88;
}
.cover-photo-button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(20, 25, 35, 0.72);
  color: white;
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-photo-button.selected {
  background: #22a447;
  color: white;
  border-color: white;
}
.property-photo.is-cover {
  outline: 3px solid #22a447;
  outline-offset: -3px;
}
.cover-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 3;
  background: #22a447;
  color: white;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.contact-section {
  margin-top: 18px;
  margin-bottom: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8ebef;
}
.contact-section > strong,
.contact-section > span {
  display: block;
  margin-bottom: 8px;
}
.contact-section .muted {
  font-size: 12px;
  color: #8a93a1;
}/* CHATPILOT LEAD INLINE EDIT */
.lead-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e8ebef;
}
.lead-item:last-child {
  border-bottom: 0;
}
.lead-contact-details {
  flex: 1;
  min-width: 0;
}
.lead-contact-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.lead-contact-heading strong {
  overflow-wrap: anywhere;
}
.lead-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  color: #475467;
  background: #f8f9fb;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}
.lead-edit-icon:hover {
  color: #172033;
  background: #eef1f5;
}
.lead-edit-icon svg {
  width: 16px;
  height: 16px;
}
.lead-edit-fields {
  display: grid;
  gap: 12px;
  max-width: 440px;
  margin: 12px 0;
}
.lead-edit-fields label {
  display: block;
  margin-bottom: 5px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}
.lead-edit-fields input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  background: #fff;
}
.lead-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.lead-edit-actions button {
  width: auto;
  margin: 0;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
}
.lead-save-button {
  background: #172033;
  color: #fff;
}
.lead-cancel-button {
  background: #eef1f5;
  color: #344054;
}
.lead-edit-error {
  margin-top: 8px;
  color: #b42318;
  font-size: 13px;
}
.lead-edit-fields[hidden],
.lead-edit-actions[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .lead-item {
    flex-direction: column;
    gap: 12px;
  }
  .lead-item > select {
    max-width: 100%;
  }
  .lead-edit-fields {
    max-width: none;
  }
}
/* CHATPILOT LEADS LAYOUT FIX V2 */
#leadsContainer {
  width: 100%;
  min-width: 0;
}
#leadsContainer .lead-item {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: start;
  gap: 22px;
  width: 100%;
  min-width: 0;
  padding: 22px 0;
  border-bottom: 1px solid #eaecf0;
}
#leadsContainer .lead-item:last-child {
  border-bottom: 0;
}
#leadsContainer .lead-contact-details {
  width: 100%;
  min-width: 0;
}
#leadsContainer .lead-contact-view {
  min-width: 0;
  margin-bottom: 14px;
}
#leadsContainer .lead-contact-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 8px;
}
#leadsContainer .lead-contact-heading strong {
  min-width: 0;
  color: #172033;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: normal;
}
#leadsContainer .lead-contact-view .muted {
  margin-top: 5px;
  color: #7b8495;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#leadsContainer .lead-edit-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: #f4f6fa;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
#leadsContainer .lead-edit-icon:hover {
  background: #e9eef8;
  border-color: #cbd5e7;
  transform: translateY(-1px);
}
#leadsContainer .lead-property-select,
#leadsContainer .lead-status-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  color: #344054;
  background-color: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
}
#leadsContainer .lead-status-select {
  width: 210px;
  max-width: 100%;
  justify-self: end;
  font-weight: 600;
  background-color: #f8f9fc;
}
#leadsContainer .lead-property-select:focus,
#leadsContainer .lead-status-select:focus {
  outline: none;
  border-color: #7c8db5;
  box-shadow: 0 0 0 3px rgba(124, 141, 181, 0.14);
}
#leadsContainer .lead-edit-fields {
  width: 100%;
  max-width: 480px;
  margin: 0 0 14px;
  gap: 14px;
}
#leadsContainer .lead-edit-fields label {
  margin: 0 0 6px;
  color: #475467;
  font-size: 12px;
  letter-spacing: 0.02em;
}
#leadsContainer .lead-edit-fields input {
  min-height: 44px;
  padding: 10px 12px;
  border-color: #dfe4ec;
  border-radius: 10px;
  font-size: 14px;
}
#leadsContainer .lead-edit-fields input:focus {
  border-color: #7c8db5;
  box-shadow: 0 0 0 3px rgba(124, 141, 181, 0.14);
}
#leadsContainer .lead-edit-actions {
  margin: 0 0 14px;
  gap: 10px;
}
#leadsContainer .lead-edit-actions button {
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 9px;
  transition: background 160ms ease, transform 160ms ease;
}
#leadsContainer .lead-save-button {
  background: #273b66;
}
#leadsContainer .lead-save-button:hover {
  background: #1c2d50;
}
#leadsContainer .lead-cancel-button {
  border: 1px solid #e0e5ed;
  background: #fff;
  color: #475467;
}
#leadsContainer .lead-edit-error {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  #leadsContainer .lead-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 20px 0;
  }
  #leadsContainer .lead-status-select {
    width: 100%;
    justify-self: stretch;
  }
  #leadsContainer .lead-property-select {
    max-width: none;
  }
}/* ChatPilot Theme Selector */
.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7deea;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  color: #172033;
}
.theme-option input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #315efb;
}
.theme-option span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.theme-option small {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}
body[data-theme="dark"] .theme-option {
  background: #1f2937;
  color: #f3f4f6;
  border-color: #374151;
}
body[data-theme="dark"] .theme-option small {
  color: #cbd5e1;
}/* ChatPilot Sidebar Theme Submenu */
.settings-nav-group {
  width: 100%;
}
.settings-nav-group > #settingsNavButton {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.theme-submenu {
  padding: 7px 10px 10px 22px;
}
.theme-submenu-title {
  margin: 2px 0 7px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.theme-submenu-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 5px;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
}
.theme-submenu-option:hover {
  background: #263449;
  color: #fff;
}
.theme-submenu-option input[type="radio"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #5278ff;
}
body[data-theme="dark"] .theme-submenu-title {
  color: #94a3b8;
}
body[data-theme="dark"] .theme-submenu-option {
  color: #cbd5e1;
}
body[data-theme="dark"] .theme-submenu-option:hover {
  background: #26354d;
  color: #fff;
}

/* CHATPILOT LEADS OUTER SPACING FIX */
#leadsView {
  box-sizing: border-box;
  padding: 34px;
}
@media (max-width: 600px) {
  #leadsView {
    padding: 20px;
  }
}

/* Dashboard: klickbare Lead-Namen und Hervorhebung */
.recent-lead-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.recent-lead-link:hover {
  color: #3157c8;
  text-decoration: underline;
}
#leadsContainer .lead-item.lead-highlight {
  background-color: #fff8d9;
  outline: 2px solid #e8c547;
  outline-offset: 4px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}
