/* Admin-Bereich Ferienhof Resthöft */
:root {
    --creme: #faf7f1;
    --sand: #f1e9da;
    --sand-tief: #e0d4bf;
    --gruen: #4f8a2f;
    --gruen-tief: #3c6c22;
    --blau: #2b5d8e;
    --blau-tief: #1d4368;
    --rot: #b5402f;
    --tinte: #2c3440;
    --grau: #5d6671;
    --radius: 12px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Rubik', system-ui, sans-serif;
    font-size: 15.5px;
    font-weight: 300;
    color: var(--tinte);
    background: var(--creme);
    line-height: 1.6;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; color: var(--blau-tief); line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 24px; }
h2 { font-size: 1.3rem; }

.admin-layout { display: flex; min-height: 100vh; }

/* Seitenleiste */
.admin-seitenleiste {
    flex: 0 0 248px;
    background: var(--blau-tief);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-marke {
    display: block;
    padding: 22px 20px 16px;
    text-decoration: none;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.14);
}
.admin-marke img {
    width: 100%;
    background: var(--creme);
    border-radius: 8px;
    padding: 8px 10px;
}
.admin-marke span {
    display: block;
    margin-top: 8px;
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    text-align: center;
}
.admin-seitenleiste nav { flex: 1; padding: 14px 12px; }
.admin-seitenleiste nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.88);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 9px;
    margin-bottom: 3px;
    transition: background .15s;
}
.admin-seitenleiste nav a:hover { background: rgba(255,255,255,.1); }
.admin-seitenleiste nav a.aktiv { background: var(--gruen); color: #fff; }
.admin-leiste-fuss {
    padding: 14px 12px 18px;
    border-top: 1px solid rgba(255,255,255,.14);
}
.admin-leiste-fuss a {
    display: block;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 9px;
}
.admin-leiste-fuss a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Inhalt */
.admin-inhalt {
    flex: 1;
    padding: 36px clamp(20px, 4vw, 56px) 80px;
    max-width: 1080px;
}

/* Karten & Formulare */
.karte {
    background: #fff;
    border: 1px solid var(--sand-tief);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 26px;
    box-shadow: 0 2px 10px rgba(44,52,64,.05);
}
.karte > h2:first-child { margin-top: 0; }
.karte .hinweis { color: var(--grau); font-size: .9rem; }

label { display: block; font-weight: 400; margin-bottom: 16px; }
label small { color: var(--grau); font-weight: 300; }
input[type=text], input[type=email], input[type=password], select, textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 10px 13px;
    font: inherit;
    font-weight: 300;
    color: var(--tinte);
    background: #fff;
    border: 1.5px solid var(--sand-tief);
    border-radius: 9px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gruen);
    box-shadow: 0 0 0 3px rgba(79,138,47,.15);
}
textarea { resize: vertical; }

.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.feld-reihe-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; }

.btn {
    display: inline-block;
    background: var(--gruen);
    color: #fff;
    font: inherit;
    font-weight: 500;
    padding: 11px 26px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn:hover { background: var(--gruen-tief); }
.btn-rot { background: var(--rot); }
.btn-rot:hover { background: #93301f; }
.btn-klein { padding: 6px 16px; font-size: .88rem; }
.btn-grau { background: #6b7480; }
.btn-grau:hover { background: #555d68; }

.meldung {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
}
.meldung.erfolg { background: #e7f3df; border: 1px solid #b9dca4; color: #2c5413; }
.meldung.warnung { background: #fbeae7; border: 1px solid #eec5bd; color: #84291c; }

/* Übersicht */
.kachel-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.kachel {
    background: #fff;
    border: 1px solid var(--sand-tief);
    border-radius: var(--radius);
    padding: 22px;
    text-decoration: none;
    color: var(--tinte);
    transition: transform .15s, box-shadow .15s;
}
.kachel:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(44,52,64,.1); }
.kachel .icon { font-size: 1.8rem; }
.kachel h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.kachel p { margin: 0; color: var(--grau); font-size: .9rem; }

/* Bild-Auswahl mit Live-Vorschau */
.bild-auswahl {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
}
.bild-auswahl select { margin-top: 0; flex: 1; min-width: 0; }
.bild-vorschau {
    flex: 0 0 auto;
    width: 112px;
    height: 76px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--sand-tief);
    background: var(--sand);
}

/* Bilderverwaltung */
.tab-leiste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.tab-leiste a {
    padding: 9px 20px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid var(--sand-tief);
    color: var(--tinte);
    text-decoration: none;
    font-size: .95rem;
}
.tab-leiste a.aktiv { background: var(--blau-tief); border-color: var(--blau-tief); color: #fff; }

.bilder-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.bild-karte {
    background: #fff;
    border: 1px solid var(--sand-tief);
    border-radius: 10px;
    overflow: hidden;
}
.bild-karte img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.bild-karte .bild-fuss {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.bild-karte .name {
    font-size: .78rem;
    color: var(--grau);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-feld {
    border: 2px dashed var(--sand-tief);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
    background: #fff;
    margin-bottom: 26px;
}
.upload-feld input[type=file] { margin: 12px auto; }

/* Login */
.login-seite {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blau-tief), #16334d);
    padding: 20px;
}
.login-karte {
    background: var(--creme);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    padding: 40px 38px;
    width: 100%;
    max-width: 400px;
}
.login-karte img { display: block; width: 200px; margin: 0 auto 10px; }
.login-karte h1 { text-align: center; font-size: 1.3rem; margin-bottom: 26px; }
.login-karte .btn { width: 100%; padding: 13px; }

table.daten { width: 100%; border-collapse: collapse; }
table.daten th, table.daten td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--sand); }

@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-seitenleiste { position: static; height: auto; flex-basis: auto; }
    .admin-seitenleiste nav { display: flex; flex-wrap: wrap; }
    .admin-seitenleiste nav a { flex: 1 1 40%; }
    .feld-reihe, .feld-reihe-3 { grid-template-columns: 1fr; }
}
