/* ==========================================================================
   1. STAMMDATEN FORMULAR (DARK MODE OPTIMIERT VIA CSS)
   ========================================================================== */
.escape-dashboard-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    color: #ffffff; /* Macht Texte innerhalb des Containers standardmäßig weiß */
}

#escape-profile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Formular-Zeilen nebeneinander */
.escape-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.escape-form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Beschriftungen im Dark Mode */
.escape-form-group label {
    color: #ffffff !important; /* Erzwingt weiße Schrift gegen dunkle Themes */
    font-weight: 600;
    font-size: 14px;
}

/* Die Eingabefelder im Dark Mode */
.escape-form-group input {
    background: #1e293b !important; /* Dunkler Schiefer-Hintergrund */
    color: #ffffff !important; /* Weiße Schrift beim Tippen */
    border: 1px solid #475569 !important; /* Dezenter grauer Rand */
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.escape-form-group input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    outline: none;
}

/* Trennlinie */
.escape-divider {
    border: 0;
    border-top: 1px solid #334155;
    margin: 15px 0;
    width: 100%;
}

/* Speicher-Button */
.escape-button {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.escape-button:hover {
    background: #2563eb;
}

/* Fehler- und Erfolgsmeldungen */
.escape-dashboard-error {
    color: #f87171 !important;
    font-weight: 500;
}
/* ==========================================================================
   2. TEXTLOSES REAKTIVES KARUSSELL (8 / 6 / 3 LAYOUT)
   ========================================================================== */
.escape-serie-block {
    margin-bottom: 35px;
}

.escape-serie-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #222;
}

/* Das unsichtbare Karussell-Fenster */
.escape-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* Die Schiene, die sich per JS verschiebt */
.escape-carousel-grid {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Buch-Karten (Reine Cover, kein Text!) */
.escape-book-card {
    position: relative;
    user-select: none;
}

.escape-cover-holder img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 8;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
    transition: transform 0.2s;
}

/* Minimaler, edler Hover-Effekt (Nur Desktop) */
@media (min-width: 1025px) {
    .escape-cover-holder img:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    }
}

.escape-no-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #e5e5e5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* ==========================================================================
   3. RESPONSIVE ABRECHNUNGS-BOXEN (KACHEL-LAYOUT)
   ========================================================================== */
.escape-earnings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    box-sizing: border-box;
}

/* Die Grundkarte für jeden Abrechnungsmonat */
.escape-earning-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Subtiler Schwebe-Effekt für die Boxen */
.escape-earning-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 🟡 Visueller Marker links für den Live-Monat (In Berechnung) */
.escape-status-live { 
    border-left: 6px solid #fbbf24; 
    background: #fffdf5; /* Ganz zarter gelblicher Hintergrund */
}

/* 🟢 Visueller Marker links für abgeschlossene Monate */
.escape-status-paid { 
    border-left: 6px solid #10b981; 
}

/* Kopfzeile der Box (Monat & Status-Badge) */
.escape-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.escape-card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* Status-Badges */
.escape-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.escape-status-live .escape-badge { 
    background: #fef3c7; 
    color: #92400e; 
}
.escape-status-paid .escape-badge { 
    background: #d1fae5; 
    color: #065f46; 
}

/* Die einzelnen Daten-Zeilen im Inneren */
.escape-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}
.escape-data-row:last-of-type { 
    border-bottom: none; 
}

.escape-data-row strong {
    color: #0f172a;
    font-weight: 600;
}

/* Trennlinie vor dem Total */
.escape-card-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

/* Die finale Verdienst-Reihe (Dicker hervorgehoben) */
.escape-total-row {
    font-size: 17px;
    color: #0f172a;
    font-weight: 700;
    border-bottom: none;
    padding-top: 8px;
}

.escape-total-amount {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

/* Bei abgeschlossenen Monaten färben wir den finalen Betrag direkt sexy Grün */
.escape-status-paid .escape-total-amount {
    color: #10b981;
}

/* ==========================================================================
   4. SMARTPHONE-OPTIMIERUNG (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 767px) {
    .escape-earning-card {
        padding: 16px;
    }

    .escape-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Auf dem Handy brechen die Zeilen um: Titel oben, Wert darunter */
    .escape-data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 0;
    }

    .escape-data-row span:last-child,
    .escape-data-row strong {
        text-align: left;
        width: 100%;
        font-size: 16px;
    }

    .escape-total-amount {
        font-size: 22px;
        margin-top: 4px;
    }
}

/* Dashboard Kanten & Karten */
.dashboard-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-card.current-month {
    border-left: 4px solid #22c55e; /* Grün für Live */
}

.dashboard-card.last-month {
    border-left: 4px solid #3b82f6; /* Blau für Fixiert */
}

/* Einklappbares Archiv (<details>) */
.dashboard-archive-section {
    margin-top: 30px;
}

details.dashboard-archive-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

summary.archive-header {
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f5f9;
}

summary.archive-header:hover {
    background-color: #e2e8f0;
}

.archive-body {
    padding: 16px;
    border-top: 1px solid #cbd5e1;
    background: #fff;
}