/* ===== FERNDIAGNOSE ADMIN SECTION ===== */
.tl-section {
  padding: 0 20px 60px 20px;
  background: transparent;
}

.tl-container {
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .tl-container {
    width: 100%;
  }
}

/* Header */
.tl-header {
  text-align: center;
  margin-bottom: 32px;
}

.tl-header h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  color: #fff;
}

.tl-header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Trigger Button */
.tl-trigger {
  text-align: center;
  margin-top: 32px;
}

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
}

/* Kompakte Buttons im Draft-Banner */
.tl-draft-banner-actions .tl-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* tl-btn-next ausserhalb des Form-Footers: kein flex-stretch, kein auto-margin */
.tl-draft-banner-actions .tl-btn-next,
.tl-draft-modal-actions .tl-btn-next {
  flex: none;
  max-width: none;
  margin-left: 0;
}

/* ===== MODAL ===== */
.tl-modal {
  position: fixed;
  top: 70px; /* Startet unterhalb der Navbar */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 20px 20px; /* Gleichmäßiger Abstand rundum */
}

.tl-modal.active {
  display: flex;
}

/* Scroll-Lock für body wenn Modal offen */
body.tl-modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  right: 0;
  top: 0;
}

.tl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.tl-modal-content {
  position: relative;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: calc(100vh - 70px - 60px); /* 100vh - navbar height - padding (20px oben + 20px unten + 20px extra Puffer) */
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.tl-modal-header {
  padding: 20px 24px 0px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.tl-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease;
  z-index: 10;
}

.tl-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.tl-modal-close svg {
  width: 18px;
  height: 18px;
}

/* Progress Bar */
.tl-progress {
  margin-bottom: 20px;
  padding-right: 0;
}

.tl-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.tl-progress-fill {
  height: 100%;
  background: #b98823;
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.tl-progress-steps {
  display: flex;
  justify-content: space-between;
}

.tl-step {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}

.tl-step.active {
  color: #b98823;
  font-weight: 600;
}

.tl-step.completed {
  color: rgba(255, 255, 255, 0.8);
}

/* Modal Body */
.tl-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

/* Form Steps */
.tl-form-step {
  display: none;
}

.tl-form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tl-form-step h3 {
  font-size: 1.3rem;
  color: #fff;
  margin: 0 0 24px;
  font-weight: 500;
}

/* Form Grid */
.tl-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tl-form-group {
  display: flex;
  flex-direction: column;
}

.tl-form-group.tl-full {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .tl-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Labels & Inputs */
.tl-form-group label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 6px;
  font-weight: 500;
}

.tl-form-group input[type="text"],
.tl-form-group input[type="number"],
.tl-form-group input[type="date"],
.tl-form-group input[type="email"],
.tl-form-group input[type="tel"],
.tl-form-group select,
.tl-form-group textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  color: #fff !important;
  font-size: 1rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  width: 100%;
  box-sizing: border-box;
}

.tl-form-group textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.5;
  font-size: 1rem;
}

/* Eigener Hinweis Textfeld - kleiner und wie ein Input */
#tl-custom-notice {
  min-height: 48px;
  max-height: 48px;
  resize: none;
  line-height: 1.5;
  font-size: 1rem;
}

.tl-form-group input::placeholder,
.tl-form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.tl-form-group input[type="text"]:focus,
.tl-form-group input[type="number"]:focus,
.tl-form-group input[type="date"]:focus,
.tl-form-group input[type="email"]:focus,
.tl-form-group input[type="tel"]:focus,
.tl-form-group select:focus,
.tl-form-group textarea:focus {
  outline: none !important;
  border-color: #b98823 !important;
  box-shadow: 0 0 0 3px rgba(185, 136, 35, 0.15) !important;
}

.tl-form-group input.error,
.tl-form-group select.error,
.tl-form-group textarea.error {
  border-color: #e74c3c !important;
}

.tl-form-group select option {
  background: #1a1a1a;
  color: #fff;
}

.tl-error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 4px;
  min-height: 18px;
}

/* Success */
.tl-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.tl-success.active {
  display: block;
}

.tl-success-icon {
  width: 80px;
  height: 80px;
  background: rgba(185, 136, 35, 0.15);
  border: 2px solid #b98823;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #b98823;
  margin: 0 auto 24px;
}

.tl-success h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.tl-success p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 24px;
  line-height: 1.6;
}

.tl-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tl-success-actions .tl-btn {
  flex: 1;
  min-width: 180px;
  max-width: 250px;
}

/* Loading */
.tl-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.tl-loading.active {
  display: flex;
}

.tl-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #b98823;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tl-loading p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Modal Footer */
.tl-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.tl-btn-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.tl-btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

#tl-save-draft-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
}

#tl-save-draft-btn:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration-color: rgba(255, 255, 255, 0.45);
}

.tl-btn-next,
.tl-btn-submit {
  margin-left: auto;
  background: rgba(185, 136, 35, 0.2);
  border: 1px solid rgba(185, 136, 35, 0.6);
  color: #b98823;
  flex: 1;
  max-width: 200px;
}

.tl-btn-next:hover,
.tl-btn-submit:hover {
  background: rgba(185, 136, 35, 0.9);
  border-color: #b98823;
  color: #000;
}

.tl-btn-submit {
  display: none;
  padding: 10px 20px;
  font-size: 0.8rem;
  max-width: 160px;
}

#tl-download-only {
  display: none;
}

.tl-modal-footer.step-4 .tl-btn-next {
  display: none;
}

.tl-modal-footer.step-4 .tl-btn-submit,
.tl-modal-footer.step-4 #tl-download-only {
  display: inline-flex;
}

.tl-modal-footer.hidden {
  display: none;
}

/* Responsive Modal */
@media (max-width: 640px) {
  .tl-modal {
    padding: 0px;
  }
  .tl-modal-content {
    max-height: calc(100svh - 70px - 0px); /* Small viewport - Navbar */
    max-height: calc(100dvh - 70px - 0px); /* Dynamic viewport (fallback) */
    margin-top: 0;
    border-radius: 15px;
  }

  /* Fallback für Browser ohne svh/dvh Support */
  @supports not (height: 100svh) {
    .tl-modal-content {
      max-height: calc(100vh - 150px); /* Konservative Höhe mit Puffer für URL-Leiste */
    }
  }

  .tl-modal-header {
    padding: 20px 16px 0px;
  }
  .tl-modal-body {
    padding: 20px 16px;
  }
  .tl-modal-footer {
    padding: 16px;
    flex-wrap: nowrap;
  }
  .tl-btn-back {
    flex: 1;
  }
  .tl-btn-next,
  .tl-btn-submit {
    flex: 1;
    max-width: none;
  }

  .tl-form-step h3 {
    font-size: 1.1rem;
  }

  .tl-success-actions {
    flex-direction: column;
  }

  .tl-success-actions .tl-btn {
    min-width: 100%;
    max-width: 100%;
  }
}

/* Small elements styling */
.tl-form-group small {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Model Buttons */
.tl-model-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tl-model-btn {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-model-btn:hover {
  background: rgba(185, 136, 35, 0.1);
  border-color: rgba(185, 136, 35, 0.3);
  color: #B98823;
}

.tl-model-btn.active {
  background: rgba(185, 136, 35, 0.15);
  border: 1px solid rgba(185, 136, 35, 0.2);
  color: #B98823;
  font-weight: 600;
}

/* Assessment Buttons */
.tl-assessment-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-assessment-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tl-assessment-btn svg {
  flex-shrink: 0;
}

.tl-assessment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Danger - Kritisch */
.tl-assessment-danger.active {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-weight: 600;
}

.tl-assessment-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Success - Unkritisch */
.tl-assessment-success.active {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #22c55e;
  font-weight: 600;
}

.tl-assessment-success:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

/* Neutral - Überwachung empfohlen */
.tl-assessment-neutral.active {
  background: rgba(185, 136, 35, 0.15);
  border: 1px solid rgba(185, 136, 35, 0.2);
  color: #B98823;
  font-weight: 600;
}

.tl-assessment-neutral:hover {
  background: rgba(185, 136, 35, 0.1);
  border-color: rgba(185, 136, 35, 0.3);
  color: #B98823;
}

@media (max-width: 600px) {
  .tl-assessment-buttons {
    flex-direction: column;
  }
  .tl-assessment-btn {
    width: 100%;
    min-width: 100%;
  }
}

/* ===== NEXTCLOUD FOLDER BROWSER ===== */
.tl-folder-browser-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-folder-browser {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.tl-folder-path {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
}

.tl-folder-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}

.tl-folder-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  gap: 12px;
}

.tl-folder-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.tl-folder-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(185, 136, 35, 0.3);
  color: #fff;
}

.tl-folder-item.selected {
  background: rgba(185, 136, 35, 0.15);
  border-color: #b98823;
  color: #b98823;
}

.tl-folder-item svg {
  margin-right: 10px;
  flex-shrink: 0;
  opacity: 0.7;
}

.tl-folder-item:hover svg {
  opacity: 1;
}

.tl-folder-empty {
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.tl-folder-actions {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-btn-folder {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.tl-btn-folder:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tl-btn-folder-new {
  background: rgba(185, 136, 35, 0.1);
  border-color: rgba(185, 136, 35, 0.3);
  color: #b98823;
}

.tl-btn-folder-new:hover {
  background: rgba(185, 136, 35, 0.2);
  border-color: #b98823;
}

.tl-spinner-small {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(185, 136, 35, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== FILE UPLOAD (DRAG & DROP) ===== */
.tl-file-upload-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-file-dropzone {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tl-file-dropzone:hover,
.tl-file-dropzone.dragover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(185, 136, 35, 0.5);
}

.tl-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.tl-dropzone-content p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.tl-dropzone-link {
  color: #b98823;
  text-decoration: underline;
  cursor: pointer;
}

.tl-dropzone-link:hover {
  color: rgba(185, 136, 35, 0.8);
}

.tl-dropzone-content small {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.tl-file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.9rem;
}

.tl-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.tl-file-icon {
  flex-shrink: 0;
  color: rgba(185, 136, 35, 0.8);
}

.tl-file-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-file-size {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-left: 8px;
  flex-shrink: 0;
}

.tl-file-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.tl-file-remove:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: rgba(255, 69, 58, 0.4);
  color: #ff453a;
}

/* Scrollbar Styling für Ordner-Liste */
.tl-folder-list::-webkit-scrollbar {
  width: 8px;
}

.tl-folder-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.tl-folder-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.tl-folder-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== MSTF-SPECIFIC COMPONENTS ===== */

/* Form Wrapper (embedded, not modal) */
.tl-form-wrapper {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  margin-top: 32px;
  position: relative;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .tl-form-wrapper {
    padding: 24px 12px;
  }
}

/* Progress (embedded version) */
.tl-progress {
  margin-top: 48px;
  margin-bottom: 32px;
}

/* Form Footer (fixed at bottom of wrapper) */
.tl-form-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* VIN Status Indicator */
.tl-vin-wrapper {
  position: relative;
}

.tl-vin-status {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.tl-vin-status.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(185, 136, 35, 0.3);
  border-top-color: #b98823;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tl-vin-status.valid::after {
  content: "✓";
  color: #22c55e;
}

.tl-vin-status.invalid::after {
  content: "✗";
  color: #e74c3c;
}

.tl-vin-status.local::after {
  content: "✓";
  color: #b98823;
}

/* Vehicle Preview Card */
.tl-vehicle-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  min-height: 100px;
}

.tl-vehicle-info {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.8;
}

.tl-vehicle-info strong {
  color: #b98823;
}

.tl-vehicle-info.placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* Fahrzeug-Steckbrief */
.tl-vi-model {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.tl-vi-year {
  color: #b98823;
  font-weight: 400;
}

.tl-vi-specs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tl-vi-row {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.tl-vi-label {
  color: rgba(255, 255, 255, 0.4);
  min-width: 66px;
  flex-shrink: 0;
  padding-top: 1px;
}

.tl-vi-value {
  color: rgba(255, 255, 255, 0.85);
}

.tl-vi-value em {
  color: rgba(255, 255, 255, 0.35);
  font-style: normal;
}

/* Hide vehicle model and year fields - auto-filled via VIN */
label[for="tl-vehicle-type"],
label[for="tl-year"],
#tl-vehicle-type,
#tl-year {
  display: none !important;
}

/* Hide parent form-group containers for cleaner layout */
label[for="tl-vehicle-type"] ~ *,
label[for="tl-year"] ~ * {
  display: none !important;
}

/* Hide the entire form-group if it contains these fields */
.tl-form-group:has(#tl-vehicle-type),
.tl-form-group:has(#tl-year) {
  display: none !important;
}

/* Always show vehicle preview container */
#tl-vehicle-preview {
  display: block !important;
}

/* Address Autocomplete Dropdown */
.tl-autocomplete-wrapper {
  position: relative;
}

.tl-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.tl-autocomplete-dropdown.active {
  display: block;
}

.tl-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.tl-autocomplete-item:hover {
  background: rgba(185, 136, 35, 0.1);
  color: #b98823;
}

/* Decision Tree */
.tl-decision-tree {
  background: none;
  border: none;
  border-radius: 12px;
  padding: 0;
  margin-top: 24px;
}

.tl-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tl-breadcrumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.tl-breadcrumb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tl-breadcrumb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tl-breadcrumb-btn svg {
  flex-shrink: 0;
}

.tl-breadcrumb-path {
  display: contents;
}

.tl-breadcrumb-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
}

.tl-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-breadcrumb-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tl-tree-level-label {
  display: none;
}

.tl-tree-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

@media (max-width: 600px) {
  .tl-tree-cards {
    grid-template-columns: 1fr;
  }
}

.tl-service-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-service-card:hover {
  background: rgba(185, 136, 35, 0.1);
  border-color: rgba(185, 136, 35, 0.3);
}

.tl-service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tl-service-card-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.tl-service-card-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
}

.tl-service-card.has-children .tl-service-card-icon svg {
  width: 18px;
  height: 18px;
}

.tl-service-card.is-leaf {
  cursor: pointer;
}

.tl-service-card-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: transparent;
}

.tl-service-card.is-leaf:hover .tl-service-card-check {
  border-color: rgba(185, 136, 35, 0.5);
}

.tl-service-card.selected .tl-service-card-check {
  background: #b98823;
  border-color: #b98823;
  color: #000;
}

.tl-service-card.selected .tl-service-card-label {
  color: #fff;
}

.tl-service-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tl-service-card-badge {
  background: #b98823;
  color: #000;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tl-service-card.selected {
  background: rgba(185, 136, 35, 0.15);
  border-color: rgba(185, 136, 35, 0.5);
}

.tl-service-card-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tl-tree-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  gap: 12px;
  grid-column: 1 / -1;
}

/* ===== Selected Services (Chips) ===== */
.tl-selected-services-wrapper {
  margin-bottom: 24px;
}

.tl-selected-services {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-selected-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  font-style: italic;
}

/* Counter */
.tl-selected-count {
  font-size: 0.75rem;
  color: #b98823;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Chip: kompakte Zeile */
.tl-service-chip {
  background: rgba(185, 136, 35, 0.08);
  border: 1px solid rgba(185, 136, 35, 0.25);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tl-service-chip:hover {
  background: rgba(185, 136, 35, 0.12);
  border-color: rgba(185, 136, 35, 0.4);
}

.tl-service-chip.comment-open {
  border-color: rgba(185, 136, 35, 0.5);
}

/* Chip Hauptzeile */
.tl-service-chip-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.tl-service-chip-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Dot-Indikator: leer = kein Kommentar, gold = Kommentar vorhanden */
.tl-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.tl-service-chip.has-comment .tl-chip-dot {
  background: #b98823;
}

.tl-service-chip-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* × Button */
.tl-service-chip-remove {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s ease;
  padding: 0;
  flex-shrink: 0;
  border-radius: 4px;
}

.tl-service-chip-remove:hover {
  color: rgba(255, 80, 70, 0.9);
}

/* Kommentarfeld: collapsed by default, öffnet sich per click */
.tl-service-chip-comment-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.2s ease;
  padding: 0 12px;
}

.tl-service-chip.comment-open .tl-service-chip-comment-wrap {
  max-height: 120px;
  padding: 0 12px 10px;
}

.tl-service-chip-comment {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 8px 10px;
  resize: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5;
}

.tl-service-chip-comment::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.tl-service-chip-comment:focus {
  outline: none;
  border-color: rgba(185, 136, 35, 0.4);
}

/* Unavailable service cards — muted by default, danger on hover */
.tl-service-card.is-unavailable {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.tl-service-card.is-unavailable:hover {
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.35);
}

.tl-service-card.is-unavailable .tl-service-card-label {
  color: rgba(255, 255, 255, 0.35);
}

.tl-service-card.is-unavailable:hover .tl-service-card-label {
  color: rgba(255, 120, 110, 0.9);
}

.tl-unavailable-icon {
  color: rgba(255, 255, 255, 0.25);
}

.tl-service-card.is-unavailable:hover .tl-unavailable-icon {
  color: rgba(255, 69, 58, 0.85);
}

.tl-service-card-unavailable-msg {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-service-card.is-unavailable:hover .tl-service-card-unavailable-msg {
  color: rgba(255, 120, 110, 0.85);
  border-top-color: rgba(255, 69, 58, 0.2);
}

/* Info notice at tree node level (e.g. Reifen & Räder) */
.tl-tree-info-notice {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
}

/* ===== Leaf Detail View ===== */
.tl-leaf-detail {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 4px;
  animation: fadeIn 0.2s ease;
}

.tl-leaf-detail-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.tl-leaf-detail-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tl-leaf-detail-comment-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-leaf-detail-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.tl-leaf-detail-label span {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.tl-leaf-detail-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  padding: 12px 14px;
  resize: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.tl-leaf-detail-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.tl-leaf-detail-textarea:focus {
  outline: none;
  border-color: rgba(185, 136, 35, 0.5);
  box-shadow: 0 0 0 3px rgba(185, 136, 35, 0.1);
}

.tl-leaf-detail-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tl-leaf-btn-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.tl-leaf-btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tl-leaf-btn-add {
  background: rgba(185, 136, 35, 0.2);
  border: 1px solid rgba(185, 136, 35, 0.5);
  border-radius: 8px;
  color: #b98823;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.tl-leaf-btn-add:hover {
  background: rgba(185, 136, 35, 0.35);
  border-color: #b98823;
  color: #d4a93a;
}

.tl-leaf-btn-remove {
  background: transparent;
  border: 1px solid rgba(255, 69, 58, 0.3);
  border-radius: 8px;
  color: rgba(255, 69, 58, 0.7);
  padding: 10px 18px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.tl-leaf-btn-remove:hover {
  background: rgba(255, 69, 58, 0.1);
  border-color: rgba(255, 69, 58, 0.5);
  color: #ff453a;
}

/* Breadcrumb: Current Leaf (nicht klickbar) */
.tl-breadcrumb-current {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1;
}

/* Summary Section (Step 4) */
.tl-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.tl-summary-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tl-summary-section:last-child {
  border-bottom: none;
}

.tl-summary-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b98823;
  margin: 0 0 8px;
}

.tl-summary-value {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.tl-summary-value ul {
  margin: 0;
  padding: 0 0 0 20px;
}

.tl-summary-value li {
  margin-bottom: 4px;
}

/* Checkbox Label */
.tl-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.tl-checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tl-checkbox-label:hover input[type="checkbox"] {
  border-color: rgba(185, 136, 35, 0.5);
}

.tl-checkbox-label input[type="checkbox"]:checked {
  background: #b98823;
  border-color: #b98823;
}

.tl-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(0px, -1px);
}

.tl-checkbox-label:hover {
  color: #fff;
}

/* Loading & Success (embedded) */
.tl-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 20px;
}

.tl-loading.active {
  display: flex;
}

.tl-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #b98823;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive Tweaks */
@media (max-width: 640px) {
  .tl-form-footer {
    flex-wrap: nowrap;
  }
  .tl-btn-back {
    flex: 1;
  }
  .tl-btn-next,
  .tl-btn-submit {
    flex: 1;
    max-width: none;
  }
}

/* Tesla App / Form Tip Box */
.tl-form-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(185, 136, 35, 0.08);
  border: 1px solid rgba(185, 136, 35, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tl-form-tip svg {
  flex-shrink: 0;
  color: #b98823;
  margin-top: 1px;
}

/* Address Row Layout (Strasse + Nr on one line, PLZ + Ort on one line) */
.tl-address-row {
  display: flex !important;
  gap: 16px;
  flex-direction: row !important;
}

.tl-address-street {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tl-address-number {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.tl-address-plz {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.tl-address-city {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .tl-address-row {
    flex-direction: column !important;
  }

  .tl-address-number,
  .tl-address-plz {
    width: 100%;
  }
}

/* ===== DESKTOP TWO-COLUMN LAYOUT ===== */

/* Sidebar standardmäßig versteckt (Mobile-First) */
.tl-sidebar-column {
  display: none !important;
}

@media (min-width: 1024px) {
  .tl-layout-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tl-form-column {
    flex: 0 0 66% !important;
    width: 66% !important;
    max-width: 66% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .tl-sidebar-column {
    display: block !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: 34% !important;
    width: 34% !important;
    position: sticky !important;
    top: 100px !important;
    align-self: flex-start !important;
    box-sizing: border-box !important;
  }

  /* Step 4 Summary auf Desktop ausblenden — Sidebar übernimmt */
  #tl-summary {
    display: none;
  }

  /* Chips in linker Spalte auf Desktop ausblenden — Sidebar übernimmt */
  .tl-selected-services-wrapper {
    display: none !important;
  }
}

/* Live-Summary Sidebar Styling */
.tl-live-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-top: 32px;
}

.tl-live-summary-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 16px;
}

.tl-live-summary-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-live-summary-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tl-live-summary .tl-summary-value {
  font-size: 0.9rem;
}

.tl-live-summary .tl-summary-value ul {
  margin: 0;
  padding: 0 0 0 16px;
}

.tl-live-summary .tl-summary-value li {
  margin-bottom: 4px;
  font-size: 0.88rem;
}

/* ===== ROOT CARD ICONS (Phosphor) ===== */
.tl-service-card.has-icon {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.tl-card-icon-area {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
}

.tl-card-icon-area i {
  font-size: 22px;
}

.tl-service-card.has-icon .tl-service-card-header {
  flex: 1;
  min-width: 0;
}

/* ===== HEPA / ADDON SECTION ===== */
.tl-leaf-addons {
  background: rgba(185, 136, 35, 0.06);
  border: 1px solid rgba(185, 136, 35, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
}

.tl-leaf-addons-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #b98823;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 10px;
}

.tl-addon-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.tl-addon-toggle {
  display: none;
}

.tl-addon-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.2s ease;
  color: transparent;
}

.tl-addon-item:hover .tl-addon-check {
  border-color: rgba(185, 136, 35, 0.5);
}

.tl-addon-toggle:checked + .tl-addon-check {
  background: #b98823;
  border-color: #b98823;
  color: #000;
}

.tl-addon-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tl-addon-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.tl-addon-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===== DRAFT: FORM FOOTER (right-side group) ===== */

.tl-form-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 640px) {
  .tl-form-footer-right {
    flex: 1;
    justify-content: flex-end;
  }

  #tl-save-draft-btn {
    display: none; /* Hide on mobile to save space; user can use email field instead */
  }
}

/* ===== DRAFT: RESTORE BANNER ===== */

.tl-draft-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  background: rgba(185, 136, 35, 0.1);
  border: 1px solid rgba(185, 136, 35, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.tl-draft-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.tl-draft-banner-text svg {
  flex-shrink: 0;
  color: #b98823;
}

.tl-draft-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.tl-draft-banner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-start;
  transition: color 0.2s ease;
}

.tl-draft-banner-close:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== DRAFT: MODAL ===== */

.tl-draft-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tl-draft-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.tl-draft-modal-content {
  position: relative;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.tl-draft-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.tl-draft-modal-close:hover {
  color: rgba(255, 255, 255, 0.85);
}

.tl-draft-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(185, 136, 35, 0.12);
  border: 1px solid rgba(185, 136, 35, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #b98823;
}

.tl-draft-modal-content h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.tl-draft-modal-content > p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  line-height: 1.6;
}

.tl-draft-modal-content .tl-form-group {
  text-align: left;
  margin-bottom: 12px;
}


.tl-draft-modal-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
  margin-bottom: 20px;
  line-height: 1.5;
}

.tl-draft-modal-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.tl-draft-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Success state */
.tl-draft-modal-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #22c55e;
}

#tl-draft-modal-success > p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}
