/* ===================================
   Antrags-Coach - Vollständiges CSS
   =================================== */

/* ===================================
   RESET & GRUNDLEGENDES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ===================================
   HEADER
   =================================== */
.app-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* ===================================
   CONTAINER & CARDS
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===================================
   BADGES
   =================================== */
.badge {
    background: #ffcc00;
    color: black;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #e8e9ea;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d5d6d7;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.button-secondary {
    background-color: #e8e9ea;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.button-secondary:hover {
    background-color: #d5d6d7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#back-to-dashboard-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#back-to-dashboard-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

#logout-button {
    background-color: white;
    color: #333;
    padding: 10px 24px;
    border: 2px solid #e8e9ea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#logout-button:hover {
    background-color: #f8f9fa;
    border-color: #d5d6d7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===================================
   SPLIT-SCREEN LAYOUT
   =================================== */
.split-container {
    display: flex;
    height: calc(100vh - 80px);
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
}

.pdf-panel {
    flex: 1;
    background: #525659;
    border-radius: 8px;
    overflow: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.coach-panel {
    flex: 0 0 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* ===================================
   STEP CARD (Fortschritt)
   =================================== */
.step-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.step-header small {
    text-transform: uppercase;
    color: #666;
    font-weight: bold;
    font-size: 0.75rem;
}

.step-header h3 {
    margin: 0.5rem 0 0 0;
    font-size: 1.3rem;
    color: #333;
}

#step-explanation {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

/* ===================================
   CHECKLIST
   =================================== */
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.checklist-item:hover {
    background: #e9ecef;
}

.checklist-item input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checklist-item label {
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

/* ===================================
   CHAT CONTAINER
   =================================== */
.chat-container {
    flex-grow: 1;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f4f6f8;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

#chat-input:focus {
    outline: none;
    border-color: #007bff;
}

/* ===================================
   CHAT MESSAGES
   =================================== */
.message {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.5;
}

.msg-user {
    background: #007bff;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.msg-ai {
    background: white;
    border: 1px solid #ddd;
    align-self: flex-start;
    color: #333;
}

/* ===================================
   PDF VIEWER
   =================================== */
#pdf-canvas {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    background: white;
}

/* ===================================
   APP LIST (Dashboard)
   =================================== */
.app-list {
    list-style: none;
    padding: 0;
}

.app-list li {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-list li:hover {
    background: #e9ecef;
}

.app-list-info {
    flex: 1;
    min-width: 0; /* Ermöglicht text-overflow */
}

.app-list-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.app-list-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Spezielle Button-Styles für Liste */
.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.text-muted {
    color: #6c757d;
    font-size: 0.85rem;
}

/* ===================================
   MODAL
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.modal-close-button:hover {
    color: #333;
}

/* ===================================
   FORMS
   =================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
}

/* ===================================
   LOADING OVERLAY
   =================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e8e9ea;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   WARNBOX (Typische Fehler)
   =================================== */
.warning-box {
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 4px solid #ffcc00;
}

.warning-box strong {
    color: #856404;
}

.warning-box p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #856404;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.hidden {
    display: none !important;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        height: auto;
    }

    .coach-panel {
        flex: 1;
        width: 100%;
    }

    .app-header {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    /* App-Liste auf Mobile */
    .app-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-list-info {
        width: 100%;
    }

    .app-list-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.main-footer {
    background: var(--bg-secondary);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--gray-200);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--primary-color);
}
.footer-container {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .footer-disclaimer {
  max-width: 550px;              /* noch schmaler */
  margin: 0.75rem auto 0.5rem;   /* zentriert, etwas Luft oben & unten */
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
  text-align: center;
  font-style: italic;            /* leicht edel wirkend */
  opacity: 0.85;                 /* dezenter Look */
}

/* kleines Symbol davor, aber sanft getönt */
.footer-disclaimer::before {
  opacity: 0.6;
  margin-right: 4px;
  font-size: 0.85rem;
}

/* Footer etwas kompakter halten */
.main-footer {
  padding-bottom: 0.5rem;
}