:root {
  --primary-color: #007AFF; /* Modernes Blau */
  --accent-color: #5856D6;
  --bg-color: #f2f2f7;
  --card-bg: #E6F2FF;
  --card-wf: #ffffff;
  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --success: #34c759;
  --danger: #ff3b30;
  --safe-area-bottom: env(safe-area-inset-bottom);
  --header-height: 60px;
  --tabbar-height: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(85px + var(--safe-area-bottom)); /* Platz für Tab-Bar inkl. iPhone Notch */
  overscroll-behavior-y: contain; /* Pull-to-Refresh Optimierung */
}



.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

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


.animate-fade-in-slow {
    animation: fadeIn 0.6s ease-out;
}


.animate-fade-in-fast {
    animation: fadeIn 0.15s ease-out;
}


/* Der fixierte Header oben */
.app-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  background: #fff;
  display: flex;
  align-items: flex-end; /* Text nach unten an den Header-Rand */
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 5px;
  z-index: 2000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 2px;
}

.header-logo { font-weight: bold; font-size: 1.1rem; color: #000000; }
.header-user { font-size: 0.8rem; color: #8e8e93; }

.login-header h1 span { color: var(--primary-color); }

.main-content-scroll-area {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Macht das Scrollen auf dem iPhone weich */
  padding-top: 60px;    /* Platz für Header */
  padding-bottom: 80px; /* Platz für Footer */
}

/* --- Header & Branding --- */
.app-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d1d1d6;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-header h1 span { color: var(--primary-color); }

.header-logo h1 span { color: var(--primary-color); }

.header-logo h1 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.user-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: #e8f5e9;
  padding: 4px 10px;
  border-radius: 12px;
}

/* --- Content & Cards --- */
.app-content {
  padding: 10px;
  max-width: 600px; /* Optimale Breite für Tablets */
  margin: 65px auto;
}

.card h2 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-item i {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.tab-item span {
  font-size: 0.65rem;
  font-weight: 500;
}

/* --- Grid für Dashboard Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  background: #f8f8fa;
  padding: 15px;
  border-radius: 14px;
  text-align: center;
}

.stat-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: block;
}

.stat-item strong {
  display: block;
  font-size: 0.9rem;
}

.stat-item small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Update für style.css */

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 15vh; /* Schiebt alles ein Stück runter von oben */
  min-height: 100vh;
  background: var(--bg-color);
}

.login-header {
  text-align: center;
  margin-bottom: 40px; /* Luft unter dem Logo/Titel */
}

.login-header h1 {
  font-size: 2.2rem;
  letter-spacing: -1px;
  margin-bottom: 5px;
}

.form-title {
  text-align: center;
  margin-bottom: 25px; /* Luft zwischen "Login" Wort und dem ersten Feld */
  color: var(--primary-color);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-card {
  width: 90%;
  max-width: 380px;
  padding: 30px;
  border-radius: 20px;
}

.form-group input:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* Komponenten */
.card {
  background: var(--card-wf);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 8px; font-weight: 600; }
.form-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  font-size: 1rem;
  background: #f9f9f9;
}

.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85px; /* Oder deine gewünschte Höhe */
  background: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ddd;
  z-index: 1000; /* Ganz wichtig! */
  padding-bottom: env(safe-area-inset-bottom); /* Platz für den Home-Balken beim iPhone */
}

.tab-item { text-decoration: none; color: #888; text-align: center; font-size: 0.75rem; }
.tab-item.active { color: var(--primary-color); }
.tab-item .icon { display: block; font-size: 1.5rem; }

.alert-danger { color: #d00; background: #fee; padding: 10px; border-radius: 8px; margin-bottom: 15px; text-align: center; }

.upload-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.upload-slot {
  background: white;
  padding: 15px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid transparent;
}

.upload-slot.done { border-color: var(--success); }

.slot-number {
  background: var(--primary-color);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.camera-button {
  background: #e5e5ea;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.camera-button input { display: none; }
.camera-button i { font-size: 1.5rem; color: #555; }

.img-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.btn-ai {
  margin-top: 20px;
  background: linear-gradient(135deg, #5856D6, #007AFF);
  box-shadow: 0 4px 15px rgba(88, 86, 214, 0.4);
}

.photo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 15px;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.photo-card.completed {
  border-color: var(--success);
}

.photo-card.loading {
  opacity: 0.5;
  background: #f0f0f0;
}

.nr {
  background: var(--bg-color);
  width: 35px; height: 35px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: bold; margin-right: 15px;
}

.preview img {
  width: 50px; height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.ai-pulse {
  animation: pulse 2s infinite;
  margin-bottom: 20px;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,122,255,0.7); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(0,122,255,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,122,255,0); }
}

.stepper-wrapper {
  display: flex;
  flex-direction: column;
  padding-bottom: 15px !important;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.stepper-content {
  flex-grow: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Karikatur Card */
.caricature-card {
  padding: 15px;
  text-align: center;
}

.caricature-card h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.img-caricature {
  max-width: 180px;
  height: auto;
  margin: 0 auto 15px;
  display: block;
}

.task-description {
  font-size: 1rem;
  font-weight: 500;
}

/* Kamera Card */
.camera-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 20px;
  margin-top: 10px;
}

/* Der nackte Icon-Kamera Button */
.icon-cam-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
}

.icon-cam-btn input { display: none; }

.icon-cam-btn i {
  font-size: 4rem; /* Riesiges Icon */
  color: var(--primary-color);
  margin-bottom: 10px;
}

.icon-cam-btn span {
  color: var(--primary-color);
  font-weight: 600;
}

/* Bild-Vorschau im Stepper */
.preview-state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.preview-state .img-wrapper {
  width: 100%;
  max-width: 300px;
  max-height: 50vh;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-captured {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s;
}

.img-captured[src=""], .img-captured:not([src]) {
  display: none;
}

/* Gruppen-Buttons (Löschen, Drehen) */
.action-buttons-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.8rem;
  border-radius: 8px;
  border: none;
  color: white;
}

.btn-danger { background: var(--danger); }
.btn-info { background: var(--accent-color); }

/* Weiter-Button */
.btn-next {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.status-card {
  text-align: center;
  padding: 15px !important;
  margin-bottom: 10px !important;
}

.status-card h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.id-display {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.step-indicator {
  font-size: 0.85rem;
  margin-top: 5px;
  color: var(--text-main);
}

.card h3 i {
  margin-right: 5px;
  opacity: 0.7;
}

/* Die Liste als Ganzes */
.webapp-list {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Ordentlich Abstand zwischen den Karten */
  padding: 0px;
}

/* Die einzelne Karte */
.list-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 10px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column; /* Alles untereinander für maximale Breite */
  position: relative;
  border-left: 16px solid #d1d1d6; /* Farbbalken für den Status */
}


.list-main {
  display: flex;
  flex-direction: column; /* Stapelt die Zeilen untereinander */
  gap: 4px;              /* Kleiner Abstand zwischen Titel, ID und Icons */
  width: 100%;
  padding: 2px 0;
}

/* Obere Zeile mit ID und Status */
.list-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.m-id {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #C0C0C0;
  padding: 5px 8px;
  border-radius: 8px;
  margin-top: 5px;
}


.v-id {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f0f0f5;
  padding: 5px 8px;
  border-radius: 8px;
  margin-top: 5px;
}

/* Der Titel - darf jetzt so lang sein wie er will */
.v-title {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 2px;
  color: #000;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.v-title-x {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 2px;
  display: block;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  border-radius: 8px;
}


.v-title-xa {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 2px;
  display: block;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  border-radius: 8px;
}


.m-id-xa {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #C0C0C0;
  padding: 15px 5px;
  border-radius: 8px;
  margin-top: 5px;
}

.v-title-meld {
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 2px;
  color: #000;
  display: block;
  white-space: normal;
  overflow: hidden;
}

.m-white {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 5px;
  text-align: justify;
  box-sizing: border-box;
  border-radius: 8px;
}

.x-white {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
}

.x-grau {
  background-color: #E6E6E6;
  color: #000;
  border: 1px solid #9E9E9E;
}



/* Untere Zeile mit Datum */
.v-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.v-adress {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #F0F0F0;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Status-Badge: Rechtsbündig, kompakt */
.list-status {
  background-color: color-mix(in srgb, var(--status-color), transparent 85%);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  min-width: 9rem !important;
  text-align: center !important;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Status-Farben */
.list-item:has(.st-processing) { border-left-color: #FFCC00; }
.list-item:has(.st-ready) { border-left-color: #34C759; }
.list-item:has(.st-transfer) { border-left-color: #007AFF; }
.list-item:has(.st-aufrufe) { border-left-color: #A7FF4F; }
.list-item:has(.st-warn) { border-left-color: #FF9500; }
.list-item:has(.st-erro) { border-left-color: #FF3B30; }

.st-processing { background: #FFF9E6; color: #997A00; }
.st-ready { background: #EAF9EE; color: #1E7E34; }
.st-transfer { background: #ffffff; color: #0056B3; margin-top: 15px;}

.st-aufrufe {--status-color: #A7FF4F; --status-text: #3F7D00; }
.st-start {--status-color: #FFF9E6; --status-text: #997A00; }
.st-ende {--status-color: #EAF9EE; --status-text: #0056B3; }
.st-warn {--status-color: #FF9500; --status-text: #0056B3; }
.st-erro {--status-color: #FF3B30; --status-text: #0056B3; }

.caps-a { background-color: color-mix(in srgb, var(--status-color), transparent 90%) !important; color: var(--status-text); font-weight: 600;} /* Sehr schwach */
.caps-b { background-color: color-mix(in srgb, var(--status-color), transparent 70%) !important; color: var(--status-text); font-weight: 600;} /* Mittel */
.caps-c { background-color: color-mix(in srgb, var(--status-color), transparent 30%) !important; color: var(--status-text); font-weight: 600;} /* Stark */
.caps-d { background: var(--status-color) !important; color: var(--status-text) !important; font-weight: 600 !important;} /* vollfarbe */




/* Detailansicht Optimierung */
.details-nav { margin-bottom: 15px; }
.btn-back { text-decoration: none; color: var(--primary-color); font-weight: 600; font-size: 0.9rem; margin-top: 5px;}

.detail-row {
  margin-bottom: 18px;
  border-bottom: 1px solid #f0f0f5;
  padding-bottom: 8px;
}

.detail-row label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.val-title { font-size: 1.1rem; font-weight: 700; color: #000; line-height: 1.3; }
.val-id { font-family: monospace; font-weight: 600; color: #444; }
.val-eyecatcher { font-style: italic; color: var(--primary-color); font-size: 0.95rem; }
.val-text { font-weight: 500; }
.val-price { font-size: 1.2rem; font-weight: 800; color: #34c759; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.html-preview {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 15px;
  margin-top: 8px;
  font-size: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

/* Button-Styling */
.btn-transfer {
  width: 100%;
  background: #34c759;
  color: white;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 10px;
  cursor: pointer;
}


.search-box {
  text-align: left;
  border-radius: 12px;
  font-weight: 600;
}


.status-info-box {
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  font-weight: 600;
}
.status-info-box.blue { background: #e6f2ff; color: #007aff; }

.v-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.v-delete-btn {
  color: #ff3b30; /* Rot */
  padding: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
}

.v-delete-btn:hover {
  transform: scale(1.2);
}

.image-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto; /* Horizontal scrollbar auf dem Handy */
  padding: 10px 0;
  scrollbar-width: none; /* Versteckt Scrollbar auf Firefox */
}

.image-gallery::-webkit-scrollbar {
  display: none; /* Versteckt Scrollbar auf Chrome/Safari */
}

.gallery-item {
  flex: 0 0 120px; /* Feste Breite der Bilder in der Liste */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.gallery-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

/* Lightbox-Effekt (optional) */
#lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}
#lightbox img { aspect-ratio: 980/723;
  width: 25%; height: auto;
  margin: auto; border-radius: 5px;
  image-rendering: auto;
}

.nav-controls {
  margin-top: 20px;
  padding: 10px;
  padding-bottom: 40px;
}

.input-group {
  margin-bottom: 15px;
  text-align: left;
}
.input-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.8rem;
  box-sizing: border-box;
}
#reader {
  border-radius: 15px;
  overflow: hidden;
}

.col-text span {
  color: var(--success);
  font-weight: bold;
}




/* --- Dashboard Grid System --- */
.dashboard-grid-wrapper {
  padding: 10px;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}


.grid-item {
  background: var(--card-bg);
  padding: 20px 10px;
  border-radius: 15px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

.grid-item:active {
  transform: scale(0.95);
}

.grid-item i {
  font-size: 2rem;
  margin-bottom: 5px;
}

.grid-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Farben für die Icons (Optional) */
.color-1 i { color: #007AFF; }
.color-2 i { color: #5856D6; }
.color-3 i { color: #34C759; }
.color-4 i { color: #FF9500; }
.color-5 i { color: #FF2D55; }
.color-6 i { color: #8E8E93; }


.quickstart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.quickstart-grid .grid-item:last-child:nth-child(odd) {
  grid-column: 1 / span 2;
  flex-direction: row; /* Optional: Icon und Text nebeneinander statt untereinander */
  justify-content: center;
  gap: 15px;
  padding: 20px;
}


/* Desktop-Anpassung: Auf dem PC 4 Spalten */
@media only screen and (min-width: 850px) {
  .quickstart-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }

  /* Erzwingt, dass das absolut letzte Element immer die volle Breite einnimmt */
  .quickstart-grid .grid-item:last-child {
    grid-column: 1 / span 4 !important; /* Erzwingt 4 Spalten Breite */
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 25px !important;
    font-size: 1.1rem !important;
  }
}

/* Status Overview Card */
.status-overview {
  display: flex;
  justify-content: space-around;
  padding: 15px;
  margin-bottom: 10px;
}
.status-item { text-align: center; }
.status-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.status-value { font-weight: bold; font-size: 0.9rem; }
.status-value.online { color: var(--success); }
.status-value.offline { color: var(--danger); }

.grid-item-d {
  background: #E6F2FF;
  padding: 20px 10px;
  border-radius: 15px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

.grid-item-d:active {
  transform: scale(0.95);
}

.grid-item-d i {
  font-size: 2rem;
  margin-bottom: 5px;
}

.grid-item-d span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Container für die Erfolgsmeldung */
.success-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.success-card {
  width: 100%;
  max-width: 500px;
  padding: 40px 25px !important;
}

.success-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 20px;
}

.info-box {
  background: var(--bg-color);
  padding: 15px;
  border-radius: 12px;
  margin: 25px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Button-Gruppe Steuerung */
.action-group {
  display: flex;
  flex-direction: column; /* Buttons untereinander auf Handy */
  gap: 15px;
  margin-top: 30px;
}

.action-group .btn-primary,
.action-group .btn-secondary {
  width: 100%; /* Volle Breite für Daumen-Klicks */
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.action-group .btn-secondary {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--text-main);
}

/* Desktop-Anpassung */
@media only screen and (min-width: 850px) {
  .action-group {
    flex-direction: row; /* Buttons nebeneinander auf PC */
  }
}

.nav-controls-fixed {
  margin-top: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative; /* Wichtig, damit z-index greift */
  z-index: 10;
}

/* Wenn zwei Buttons da sind, untereinander stapeln für bessere Daumen-Bedienung */
.button-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  margin-top: 20px;
}

.full-width {
  width: 100% !important;
  display: block;
  text-align: center;
}

.btn-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: var(--text-main);
  border: 2px solid #ddd;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  width: 100%;
  -webkit-tap-highlight-color: transparent; /* Verhindert graues Flackern beim Klicken */
}

.btn-primary.full-width {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

/* --- Link-Style für Dashboard Stats --- */
.stats-link {
  text-decoration: none; /* Entfernt den Unterstrich */
  color: var(--text-muted); /* Nutzt deine definierte gedimmte Farbe */
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.stats-link:hover,
.stats-link:active {
  text-decoration: none; /* Stellt sicher, dass auch beim Drücken kein Unterstrich kommt */
  color: var(--primary-color); /* Dezentes Feedback: Link wird blau beim Tippen/Hover */
  transform: scale(1.02); /* Minimaler Zoom-Effekt für haptisches Feedback */
}

/* Optional: Falls der Text innerhalb des Links noch fetter sein soll */
.stats-link small {
  font-weight: 40;
  font-size: 0.75rem;
}


@media only screen and (max-width: 850px) {

  .html-preview {
    padding: 5px;
    margin-top: 8px;

  }

}


@media (prefers-color-scheme: dark) {
    /* Grundfarben */
    body {
        background: #121212;
    }

    /* Überschriften */
    h4, .section-title, .group-title-large {
        color: #ffffff !important;
    }

    .re-styl {
        margin-bottom: 20px;
        background: #2a2a2a;
    }
}


.btn-save-site { background: #34C759; color: white; border: none; padding: 10px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; }

.btn-back-site {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    background: #34C759;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-site:hover {
    transform: scale(1.02);
    background: #2a9d4e;
}


.btn-save-site:hover,
.btn-save-site:active {
  text-decoration: none; /* Stellt sicher, dass auch beim Drücken kein Unterstrich kommt */
  color: var(--primary-color); /* Dezentes Feedback: Link wird blau beim Tippen/Hover */
  transform: scale(1.02); /* Minimaler Zoom-Effekt für haptisches Feedback */
}


.card-icon {
  background: var(--card-wf);
  padding: 25px;
  margin-top: 5px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  text-align: center;
  text-align-last: center;
}

.preloader_mail {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 9999;
        display: flex;
        transition: opacity 0.5s ease, visibility 0.5s;
}


.preloader_mail.loaded {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
}

#ptr-indicator {
    position: fixed;
    top: -60px; /* Startet außerhalb des Bildschirms */
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #007aff;
    z-index: 99999; /* Muss über dem Header sein */
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
}

#ptr-indicator i {
    font-size: 1.2rem;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

#ptr-indicator span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Wenn weit genug gezogen wurde, dreht sich der Pfeil */
#ptr-indicator.ptr-flip i {
    transform: rotate(180deg);
}

/* Während des Ladens (optionaler Spinner-Effekt) */
#ptr-indicator.ptr-loading i {
    animation: rotate-ptr 1s linear infinite;
}

@keyframes rotate-ptr {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {

--bg-color: #ff00ff;

    /* Grundfarben */
    body {
        background: #121212;
    }

    /* Überschriften */
    h4, .section-title, .group-title-large {
        color: #ffffff !important;
    }

.re-styl {
margin-bottom: 20px;
background: #ff99ff;

}



}



.text-justify {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    text-justify: inter-word;
}