/* Grundlegendes Reset/Style */
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", Arial, sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

.navbar-brand {
  font-weight: 500;
}

/* Login Container */
.login-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

/* Generelle Abstände, Box-Sizing */
* {
  box-sizing: border-box;
}

/* Neue Stile für die Kundensuche */
.search-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  padding-right: 40px;
  border: none;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

/* Überarbeitete Kachel-Styling */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.result-card {
  position: relative;
  background: white;
  padding: 15px;
  border-top: 1px solid #e0e0e0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px; /* Feste Höhe für Desktop */
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
  margin: 0;
  width: 100%;
}

.result-card:hover {
  background-color: #f5f5f5;
}

.customer-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 60px; /* Platz für Stern */
}

.customer-name-row {
  display: flex;
  align-items: center;
  gap: 0; /* Kein Abstand zwischen Name und Notiz-Icon */
}

.customer-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-project {
  font-size: 12px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-address {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 8px 12px; /* Anpassung für größere Größe */
  border-radius: 10px;
  font-size: 25px; /* 2,5-fache Größe */
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
}

.status-open {
  background: #e7f3fe;
  color: #1a73e8;
}

.status-done {
  background: #e6f4ea;
  color: #34c759;
}

.status-pending {
  background: #fff3e0;
  color: #fb8c00;
}

.status-planned {
  background: #fffde7;
  color: #f4b400;
}

.status-blocked {
  background: #ffebee;
  color: #d32f2f;
}

.status-hold {
  background: #f3e5f5;
  color: #7b1fa2;
}

.star-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px; /* Größerer Stern */
  cursor: pointer;
  transition: all 0.2s ease;
  border: none; /* Kein Kreis mehr */
}

.star-icon:not(.favorite) {
  color: #ccc;
  opacity: 0.6;
}

.star-icon.favorite {
  color: #ffeb3b;
  opacity: 1;
}

.owner-icon {
  position: absolute;
  top: 12px;
  right: 40px; /* Abstand zum Stern sicherstellen */
  font-size: 16px;
  color: #999;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  margin-left: 10px; /* Abstand vom Namen */
}

.owner-icon:hover {
  opacity: 0.8;
}

/* Responsive Anpassungen für Kacheln */
@media (max-width: 768px) {
  .results-container {
    display: flex;
    flex-direction: column;
  }

  .result-card {
    height: 100px; /* Kleinere Höhe für Tablets */
    padding: 10px;
  }

  .customer-name {
    font-size: 14px;
  }

  .customer-project {
    font-size: 11px;
  }

  .customer-address {
    font-size: 12px;
  }

  .status {
    bottom: 8px;
    right: 8px;
    font-size: 20px; /* Anpassung für Tablets */
    padding: 6px 10px;
  }

  .star-icon {
    top: 8px;
    right: 8px;
    font-size: 20px;
  }

  .owner-icon {
    top: 10px;
    right: 35px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .result-card {
    height: 90px; /* Noch kleinere Höhe für Smartphones */
    padding: 8px;
  }

  .customer-name {
    font-size: 13px;
  }

  .customer-project {
    font-size: 10px;
  }

  .customer-address {
    font-size: 11px;
  }

  .status {
    bottom: 6px;
    right: 6px;
    font-size: 15px; /* Anpassung für Smartphones */
    padding: 4px 8px;
  }

  .star-icon {
    top: 6px;
    right: 6px;
    font-size: 18px;
  }

  .owner-icon {
    top: 8px;
    right: 30px;
    font-size: 12px;
  }

  .customer-info {
    padding-right: 50px;
  }
}

/* Neue Klassen für customer.php */
.navbar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.client-logo, .carrier-logo {
  max-height: 30px;
  object-fit: contain;
}

.mobile-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
}

.customer-card {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #fff;
}

.note-field {
  border: 1px solid #ced4da;
  border-radius: 4px;
  resize: vertical;
}

.note-field:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* Modernisierte Timeline */
.timeline-block {
  background: #ffffff;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.timeline-block:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-block h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a73e8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-block .list-group-item {
  border: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.timeline-block .list-group-item:last-child {
  border-bottom: none;
}

.timeline-block .list-group-item:hover {
  background-color: #f8f9fa;
}

.timeline-block .fw-bold {
  font-size: 1rem;
  color: #222;
  font-weight: 600;
}

.timeline-block .badge {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
}

.timeline-block .badge.status-open {
  background: #e9ecef;
  color: #6c757d;
}

.timeline-block .badge.status-cancel {
  background: #ffebee;
  color: #d32f2f;
}

.timeline-block .badge.status-done {
  background: #e6f4ea;
  color: #34c759;
}

/* Modernisierte Tabs */
.nav-tabs {
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  background: #f8f9fa;
}

.nav-tabs .nav-item {
  flex-grow: 1;
  flex-shrink: 1;
  text-align: center;
}

.nav-tabs .nav-link {
  color: #6c757d;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border: none;
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  background: #fff;
  margin: 4px 2px 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-size: 1.1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-tabs .nav-link.active {
  color: #1a73e8;
  border-bottom: 4px solid #1a73e8;
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link:hover {
  color: #1a73e8;
  border-bottom: 4px solid #1a73e8;
  background: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tab-content h5 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a73e8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-content a {
  color: #1a73e8;
  text-decoration: none;
}

.tab-content a:hover {
  text-decoration: underline;
}

.category-container {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1rem;
  background: #f8f9fa;
}

/* Neue Regel für einheitliche Button-Breite in customer.php */
.btn {
  min-width: 120px; /* Einheitliche Mindestbreite für Buttons */
  text-align: center;
}

/* Bestehende Button-Styling anpassen */
.photo-delete {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  min-width: auto; /* Ausnahme für kleine Delete-Button */
}

.photo-upload {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  min-width: 120px; /* Einheitliche Breite auch für Upload */
}

.photo-upload:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
  outline: none;
}

.photo-img {
  border: 1px solid #dee2e6;
  border-radius: 4px;
}


.login-container {
  max-width: 400px;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.login-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}

/* Tabs Styling */
.login-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1.5rem;
}

.login-tabs .nav-link {
  color: #6c757d;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.login-tabs .nav-link:hover {
  color: #1a73e8;
}

.login-tabs .nav-link.active {
  color: #1a73e8;
  border-bottom: 2px solid #1a73e8;
}

.login-tab-content {
  padding: 0.5rem 1.5rem;
}

/* E-Mail Login Styling */
.login-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.login-input {
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
  outline: none;
}

.input-group-text {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: #666;
}

.login-button {
  background: #1a73e8;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  transition: all 0.3s ease;
  min-width: 120px; /* Einheitliche Breite */
}

.login-button:hover {
  background: #1557b0;
  transform: translateY(-2px);
}

.login-button:active {
  transform: translateY(0);
}

.login-error {
  font-size: 0.875rem;
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

/* QR-Code Login Styling */
.qr-login-container {
  text-align: center;
  padding: 1rem;
}

.qr-login-text {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.qr-code-scanner {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.qr-video {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
}

.qr-scan-button {
  background: #34c759;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  transition: all 0.3s ease;
  min-width: 120px; /* Einheitliche Breite */
}

.qr-scan-button:hover {
  background: #2ea44f;
  transform: translateY(-2px);
}

.qr-scan-button:active {
  transform: translateY(0);
}

.qr-result-text {
  font-size: 0.875rem;
  color: #333;
  margin-top: 1rem;
}

/* QR Generator Styling */
.qr-list-item {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

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

.qr-code-image {
  max-width: 200px;
  width: 100%;
  border-radius: 8px;
}

.qr-expired {
  background: #f8d7da;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Responsive Anpassungen für Login und QR */
@media (max-width: 576px) {
  .login-container {
    padding: 1.5rem;
    margin: 10px;
  }

  .login-logo {
    max-width: 150px;
  }

  .login-tabs .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .login-tab-content {
    padding: 0.5rem 1rem;
  }

  .login-input,
  .login-button,
  .qr-scan-button {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  .input-group-text {
    padding: 0.5rem;
  }

  .qr-video {
    max-width: 250px;
  }

  .qr-login-text {
    font-size: 0.875rem;
  }

  .qr-code-image {
    max-width: 150px;
  }

  .qr-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .qr-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Überarbeitetes Modal für Eigentümer-Daten */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  padding: 0;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 1.5rem;
  background: #1a73e8;
  color: #ffffff;
  border-radius: 12px 12px 0 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  color: #444;
  background: #fff;
}

.modal-body p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.modal-body p:last-child {
  border-bottom: none;
}

.modal-body strong {
  color: #222;
  font-weight: 500;
  flex: 0 0 120px;
}

.modal-body span {
  flex: 1;
  text-align: right;
}

.modal-footer {
  border-top: 1px solid #e0e0e0;
  padding: 1rem 1.5rem;
  background: #fafafa;
  border-radius: 0 0 12px 12px;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 120px; /* Einheitliche Breite */
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-close {
  font-size: 1rem;
  color: #ffffff;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

/* Responsive Modal-Anpassungen */
@media (max-width: 576px) {
  .modal-content {
    margin: 10px;
  }

  .modal-header, .modal-footer {
    padding: 0.75rem 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-body p {
    font-size: 0.9rem;
  }

  .modal-body strong {
    flex: 0 0 100px;
  }
}

/* Überarbeitetes Styling für die Notiz-Icons */

/* Grundlegendes Reset/Style */
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

/* Header-Block mit Kundendaten */
.header-block {
  background: #e3f0ff; /* Hellblau, dezent */
  color: #333;
  padding: 2rem 1.5rem;
  margin: 0; /* Kein Margin, damit er ganz von links nach rechts geht */
  border-radius: 0; /* Kantige Ecken */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-block h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.header-block .detail-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.header-block .detail-label {
  font-weight: 500;
  min-width: 100px;
  color: #555;
}

.header-block .detail-value {
  color: #333;
  font-weight: 400;
}

/* Status-Banner */
.status-banner {
  padding: 1rem;
  margin-bottom: 0; /* Kein Abstand zum Notizen-Block */
  border-radius: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
}

.status-planned .status-banner {
  background: #fffde7;
  color: #f4b400;
  border: 1px solid #f4b400;
}

.status-blocked .status-banner {
  background: #ffebee;
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

.status-hold .status-banner {
  background: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #7b1fa2;
}

/* Notizen-Block */
.notes-block {
  background: #f8f9fa; /* Sichtbares Hellgrau */
  padding: 1.5rem;
  margin: 0; /* Kein Abstand zum Header-Block */
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.notes-block:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notes-block .form-label {
  font-weight: 600;
  color: #444;
  margin-bottom: 0.75rem;
}

.notes-block textarea {
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 1rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.notes-block textarea:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
  outline: none;
}

/* Bauüberwachung */
.category-container {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-container h6 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #444;
}

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.photo-item {
  position: relative;
  flex: 0 0 calc(33.33% - 0.67rem);
  max-width: calc(33.33% - 0.67rem);
}

.photo-item img {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  width: 100%;
  height: auto;
}

/* Responsive Anpassungen für Tabs und andere Elemente */
@media (max-width: 768px) {
  .header-block {
    padding: 1.5rem 1rem;
  }

  .header-block h2 {
    font-size: 1.5rem;
  }

  .header-block .detail-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .notes-block, .timeline-block, .tab-content, .category-container {
    padding: 1rem;
  }

  .photo-item {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .header-block {
    padding: 1rem;
  }

  .header-block h2 {
    font-size: 1.25rem;
  }

  .header-block .detail-row {
    gap: 0.25rem;
  }

  .photo-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .nav-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
  }

  .tab-content h5 {
    font-size: 1.1rem;
  }
}

/* Add these styles to your existing style.css file */

.login-body {
    background-color: #091137;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 400px;
    width: 100%;
    transition: all 0.3s ease;
}

.nav-pills .nav-link {
    color: #6c757d;
    transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.form-control:focus, .btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

.qr-video {
    aspect-ratio: 1/1;
    object-fit: cover;
    background-color: #000;
}