/* Grundlegendes modernes Styling & Dark Mode */
body {
    background-color: #121214;
    color: #e1e1e6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

/* NEU: Sprengt die Ketten! Nutzt jetzt fast die volle Breite deines großen Monitors */
.app-container {
    max-width: 96vw;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #ffffff;
    margin-bottom: 5px;
}

header h1 span {
    color: #40916c; /* Edles Waldgrün als Markenfarbe */
}

header p {
    color: #8f8f9d;
    margin: 0;
}

/* --- NEU: Das saubere, symmetrische 3-Spalten Layout --- */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 1fr; /* Links Regler, Mitte & Rechts teilen sich exakt den Rest */
    gap: 25px;
    align-items: start;
    height: calc(100vh - 190px);
}

section {
    background-color: #1a1a1e;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #29292e;
}

/* Spalten scrollbar machen, ohne die Seite zu strecken */
.controls-sidebar, .preview-area, .right-navigation {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- NEU: Schicke Dark-Mode Scrollbalken --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #121214; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #3e3e46; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #40916c; 
}

h2 {
    color: #40916c; /* Waldgrün für die Überschriften */
    margin-top: 0;
    font-size: 1.2rem;
}

/* Schicke Formularelemente */
.control-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #c4c4cc;
    font-weight: 600;
}

input[type="file"], select, input[type="number"] {
    width: 100%;
    padding: 10px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 6px;
    color: #e1e1e6;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

/* Fokus-Effekt für die Eingabefelder */
input[type="file"]:focus, select:focus, input[type="number"]:focus {
    border-color: #40916c;
}

/* Platzhalter für das Vorschau-Grid */
.placeholder-box {
    border: 2px dashed #29292e;
    border-radius: 6px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8f8f9d;
}

/* Überschriften-Design für die rechte Spalte */
.right-navigation h2 {
    font-size: 0.95rem;
    color: #8f8f9d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #29292e;
    padding-bottom: 8px;
}

/* --- NEU: Login-Seite --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-box {
    background-color: #1a1a1e;
    border-radius: 8px;
    border: 1px solid #29292e;
    padding: 40px;
    width: 100%;
    max-width: 360px;
}

.login-box header {
    margin-bottom: 25px;
}

.login-box input[type="text"], .login-box input[type="password"] {
    width: 100%;
    padding: 10px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 6px;
    color: #e1e1e6;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
    margin-bottom: 15px;
}

.login-box input[type="text"]:focus, .login-box input[type="password"]:focus {
    border-color: #40916c;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background-color: #40916c;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-box button:hover {
    background-color: #359160;
}

.error-message {
    color: #e05252;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* --- NEU: Modal für "Passwort ändern" --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.visible {
    display: flex;
}

.modal-box {
    background-color: #1a1a1e;
    border-radius: 8px;
    border: 1px solid #29292e;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-sizing: border-box;
}

.modal-box h2 {
    margin-top: 0;
}

.modal-box p.hinweis {
    color: #8f8f9d;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-box input[type="password"] {
    width: 100%;
    padding: 10px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 6px;
    color: #e1e1e6;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
    margin-bottom: 15px;
}

.modal-box input[type="password"]:focus {
    border-color: #40916c;
}

.modal-box button {
    width: 100%;
    padding: 12px;
    background-color: #40916c;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-box button:hover {
    background-color: #359160;
}

.tour-buttons {
    display: flex;
    gap: 10px;
}

.tour-buttons button {
    flex: 1;
}

/* Wiederverwendbarer "Zurück"/Aktions-Button, den mehrere Seiten nutzen */
.studio-back-btn {
    background: #29292e;
    color: #c4c4cc;
    border: 1px solid #3e3e46;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.85rem;
    transition: 0.2s;
}

.studio-back-btn:hover {
    background: #3e3e46;
    color: #fff;
}

.modal-box button.sekundaer {
    background-color: #29292e;
    border: 1px solid #3e3e46;
}

.modal-box button.sekundaer:hover {
    background-color: #3e3e46;
}

/* --- NEU: Startseite fadeneskalation.de --- */

.app-container section {
    margin-bottom: 30px;
}

.app-container section p {
    color: #c4c4cc;
    line-height: 1.6;
}

/* Kooperationen: zwei Kontaktkarten nebeneinander */
.kontakt-personen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.kontakt-karte {
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 18px;
}

.kontakt-karte h3 {
    color: #40916c;
    margin: 0 0 6px 0;
    font-size: 1.05rem;
}

.kontakt-karte p {
    margin: 2px 0;
    font-size: 0.9rem;
}

/* ZDF-Kacheln */
.zdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.zdf-kachel {
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s;
}

.zdf-kachel:hover {
    border-color: #40916c;
}

.zdf-kachel h3 {
    color: #ffffff;
    font-size: 1rem;
    margin: 0 0 6px 0;
}

.zdf-kachel p {
    margin: 0;
    font-size: 0.85rem;
    color: #8f8f9d;
}

/* Affiliate-Logos */
.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.affiliate-karte {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.affiliate-karte img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Social-Links, LinkTree-Style */
.social-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.social-link {
    display: block;
    text-align: center;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 14px;
    color: #e1e1e6;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.social-link:hover {
    border-color: #40916c;
    color: #40916c;
}

/* Fußzeile */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 10px;
}

footer a {
    color: #8f8f9d;
    text-decoration: none;
    font-size: 0.85rem;
}

footer a:hover {
    color: #40916c;
}

/* --- NEU: Admin-Dashboard --- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.dashboard-karte {
    background-color: #1a1a1e;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 22px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    color: #e1e1e6;
    font-family: inherit;
}

.dashboard-karte:hover {
    border-color: #40916c;
}

.dashboard-karte .icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
    display: block;
}

.dashboard-karte h3 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 1.05rem;
}

.dashboard-karte p {
    margin: 0;
    color: #8f8f9d;
    font-size: 0.85rem;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Größeres Modal für Formulare */
.modal-box.gross {
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-box label {
    display: block;
    margin-bottom: 6px;
    color: #c4c4cc;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-box input[type="text"],
.modal-box input[type="url"],
.modal-box textarea {
    width: 100%;
    padding: 10px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 6px;
    color: #e1e1e6;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
    margin-bottom: 15px;
}

.modal-box input[type="text"]:focus,
.modal-box input[type="url"]:focus,
.modal-box textarea:focus {
    border-color: #40916c;
}

/* Dynamische Liste (ZDFs, Ansprechpartner) */
.eintrag-liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.eintrag-zeile {
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 6px;
    padding: 14px;
    position: relative;
}

.eintrag-zeile .loeschen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #e05252;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

.eintrag-zeile .loeschen-btn:hover {
    color: #ff7676;
}

.hinzufuegen-btn {
    width: 100%;
    padding: 10px;
    background-color: #29292e;
    border: 1px dashed #3e3e46;
    border-radius: 6px;
    color: #c4c4cc;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    margin-bottom: 15px;
}

.hinzufuegen-btn:hover {
    border-color: #40916c;
    color: #40916c;
}

/* Logo-Upload-Vorschau im Admin */
.logo-upload-zeile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-upload-zeile .logo-vorschau {
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-upload-zeile .logo-vorschau img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.speichern-hinweis {
    color: #40916c;
    font-size: 0.85rem;
    margin-top: -8px;
    margin-bottom: 12px;
    display: none;
}

.speichern-hinweis.sichtbar {
    display: block;
}

/* --- NEU: Kreative Auffrischung der Startseite --- */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;1,9..144,500&display=swap');

/* Logo im Kopfbereich */
.site-logo {
    max-width: 110px;
    max-height: 110px;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 12px;
}

header h1 {
    font-family: 'Fraunces', 'Segoe UI', serif;
    font-size: 2.4rem;
    letter-spacing: 0.5px;
}

/* Stitch-Divider - kleines Kreuzstich-Deko-Element zwischen Abschnitten */
.stitch-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px 0;
    opacity: 0.6;
}

.stitch-divider .dash {
    width: 24px;
    height: 2px;
    background-color: #40916c;
}

.stitch-divider .x {
    color: #40916c;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Icons vor den Sektions-Überschriften */
.app-container section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sanftes Anheben beim Hovern über Kacheln/Karten */
.zdf-kachel,
.kontakt-karte,
.affiliate-karte,
.dashboard-karte {
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.zdf-kachel:hover,
.kontakt-karte:hover,
.dashboard-karte:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.affiliate-karte:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.social-link {
    transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

.social-link:hover {
    transform: translateY(-2px);
}

/* Leicht unterschiedliche Akzenttöne pro Sektion (dezent) */
#zdf-status h2 { color: #40916c; }
#ansprechpartner h2 { color: #52b788; }
#fadenspur h2 { color: #74c69d; }
#affiliates h2 { color: #d9a441; }
#social-links h2 { color: #40916c; }