/* Kundenportal Styles */
.kp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.kp-section {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.kp-header h2 {
    margin: 0;
    color: #1a1a1a;
}

/* Formulare */
.kp-form-group {
    margin-bottom: 20px;
}

.kp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.kp-form-group input[type="text"],
.kp-form-group input[type="tel"],
.kp-form-group input[type="datetime-local"],
.kp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.kp-form-group input:focus,
.kp-form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
}

/* Buttons */
.kp-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.kp-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.kp-btn-secondary {
    background: #1f2937;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.kp-btn-secondary:hover {
    background: #111827;
}

.kp-btn-upload {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
    font-size: 14px;
}

.kp-btn-upload:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.kp-file-input {
    display: none;
}

/* Auftrags-Karten */
.kp-order-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.kp-order-card:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kp-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.kp-order-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 22px;
}

/* Status-Badge */
.kp-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.kp-status-neu {
    background: #E3F2FD;
    color: #1976D2;
}

.kp-status-ve {
    background: #FFF3E0;
    color: #F57C00;
}

.kp-status-bereit {
    background: #E8F5E9;
    color: #388E3C;
}

.kp-status-abgeschlossen {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* Auftrags-Info */
.kp-order-info {
    margin-bottom: 20px;
}

.kp-order-info p {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.kp-order-info strong {
    color: #333;
    font-weight: 600;
}

/* Fortschrittsbalken */
.kp-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.kp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #4CAF50);
    transition: width 0.5s ease;
}

/* Zeitstrahl (Timeline) - als Kästen mit Rahmen */
.kp-timeline {
  display: flex;
  align-items: stretch;
  padding: 20px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  gap: 48px;
}

.kp-timeline-step {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  position: relative;
  transition: all 0.3s ease;
}

.kp-timeline-step:hover {
    border-color: #dc2626;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
    transform: translateY(-3px);
}

.kp-timeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #e5e7eb;
  color: #9ca3af;
  border: 3px solid #d1d5db;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.kp-timeline-content {
  text-align: center;
  width: 100%;
}

.kp-timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1.4;
  margin-bottom: 6px;
}

.kp-timeline-substatus {
  font-size: 11px;
  color: #dc2626;
  margin-top: 4px;
  font-weight: 600;
  font-style: italic;
}

/* Erledigte Phase - rot hinterlegt */
.kp-timeline-completed {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #dc2626;
  border-width: 3px;
}

.kp-timeline-completed .kp-timeline-icon {
  background: #dc2626;
  color: #fff;
  border-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.kp-timeline-completed .kp-timeline-title {
  color: #991b1b;
  font-weight: 700;
}

/* Aktive Phase - rot/schwarz hervorgehoben */
.kp-timeline-active {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  border-color: #dc2626;
  border-width: 3px;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
  transform: translateY(-4px);
}

.kp-timeline-active .kp-timeline-icon {
  background: #dc2626;
  color: #fff;
  border-color: #b91c1c;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3);
  transform: scale(1.1);
}

.kp-timeline-active .kp-timeline-title {
  color: #fff;
  font-weight: 700;
}

.kp-timeline-active .kp-timeline-substatus {
  color: #fca5a5;
}

/* Ausstehende Phase */
.kp-timeline-pending {
  background: #f9fafb;
  border-color: #e5e7eb;
  opacity: 0.7;
}

.kp-timeline-pending .kp-timeline-icon {
  background: #f3f4f6;
  color: #d1d5db;
  border-color: #e5e7eb;
}

.kp-timeline-pending .kp-timeline-title {
  color: #9ca3af;
}

/* Pfeile zwischen Kästen */
.kp-timeline-step:not(:last-child)::after {
  content: '\27A4';
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: #d1d5db;
  z-index: 10;
}

.kp-timeline-completed:not(:last-child)::after {
  color: #dc2626;
}

.kp-timeline-active:not(:last-child)::after {
  color: #dc2626;
}

/* Terminanfrage-Buttons in Phase 3 */
.kp-timeline-actions {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.kp-btn-small {
  display: inline-block;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  transition: all 0.15s ease;
  background: #dc2626;
  color: #fff;
}

.kp-btn-small:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.kp-timeline-form {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

/* Verbindungslinien entfernen (nicht mehr benötigt bei Kästen) */
.kp-timeline-line {
  display: none;
}

.kp-timeline-line-completed {
  display: none;
}

/* Upload-Bereich */
.kp-upload-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.kp-upload-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.kp-upload-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kp-uploads {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.kp-uploads h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.kp-upload-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Terminbereich */
.kp-appointment-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.kp-appointment-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.kp-appointment-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.kp-btn-appointment {
    flex: 1;
    min-width: 150px;
}

.kp-appointment-form {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.kp-appointments {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.kp-appointments h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.kp-appointment-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
}

.kp-appointment-item p {
    margin: 5px 0;
}

.kp-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #E3F2FD;
    color: #1976D2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Nachrichten */
.kp-message,
.kp-upload-message,
.kp-appt-message {
    margin-top: 15px;
}

.kp-error {
    padding: 12px;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 8px;
    border-left: 4px solid #C62828;
}

.kp-success {
    padding: 12px;
    background: #E8F5E9;
    color: #2E7D32;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.kp-loading {
    padding: 12px;
    background: #E3F2FD;
    color: #1976D2;
    border-radius: 8px;
    text-align: center;
}

.kp-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .kp-section {
        padding: 20px;
    }
    
    .kp-order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kp-order-header h3 {
        margin-bottom: 10px;
        font-size: 18px;
    }
    
    .kp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kp-header h2 {
        margin-bottom: 15px;
    }
    
    .kp-upload-buttons,
    .kp-appointment-buttons {
        flex-direction: column;
    }
    
    .kp-btn-upload,
    .kp-btn-appointment {
        width: 100%;
        margin-right: 0;
    }
}

/* Admin Styles */
.card {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 20px 0;
    padding: 20px;
}

.card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

