/* ---------------------------------------------------
   Farbvariablen & Dark Mode
--------------------------------------------------- */
:root {
    --bg: #f7f7f7;
    --text: #333;
    --white: #ffffff;
    --accent: #ff9f7c;
    --accent-dark: #ff6f50;
    --shadow: rgba(0,0,0,0.15);
}

/* Dark Mode aktiv */
.dark {
    --bg: #1a1a1a;
    --text: #e6e6e6;
    --white: #2a2a2a;
    --accent: #ff7b5c;
    --accent-dark: #ff5a3a;
    --shadow: rgba(255,255,255,0.1);
}

/* Weiche Übergänge */
body, .form-section, .chart-box, .detail-box, .intro, .stat-box {
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---------------------------------------------------
   Global
--------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* PARALLAX-HINTERGRUND */
body {
    background: url('../img/hintergrund.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    padding-bottom: 4rem;
}

/* ---------------------------------------------------
   Header
--------------------------------------------------- */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 2rem;
    position: relative;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Fixiertes Bild oben rechts */
.portrait-fixed {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 90px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

/* ---------------------------------------------------
   Intro & Formulare
--------------------------------------------------- */
.intro, .form-section, .stat-box, .detail-box {
    background: var(--white);
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 900px;
    border-radius: 18px;
    box-shadow: 0 10px 25px var(--shadow);
}

.dark .intro,
.dark .form-section,
.dark .stat-box,
.dark .detail-box {
    background: rgba(30,30,30,0.88);
}

.intro h2 {
    margin-bottom: 1rem;
}

.highlight {
    background: #ffe7db;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    border-left: 5px solid var(--accent-dark);
}

/* ---------------------------------------------------
   Formularfelder
--------------------------------------------------- */
label {
    display: block;
    margin: 0.4rem 0;
    cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.3rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

/* ---------------------------------------------------
   Buttons
--------------------------------------------------- */
.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: var(--accent-dark);
}

/* ---------------------------------------------------
   Tabellen (Admin Dashboard)
--------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

th {
    background: #ffe7db;
    font-weight: bold;
}

/* ---------------------------------------------------
   Diagramm-Container
--------------------------------------------------- */
.chart-box {
    background: var(--white);
    padding: 1.5rem;
    margin: 2rem auto;
    border-radius: 18px;
    max-width: 1000px;
    box-shadow: 0 10px 25px var(--shadow);
}

/* ---------------------------------------------------
   Dark Mode Button
--------------------------------------------------- */
.darkmode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: var(--white);
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 999;
}


/* Dezenter Admin-Button unten rechts */
.admin-button {
    position: fixed;
    bottom: 70px; /* über dem Darkmode-Button */
    right: 20px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-decoration: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px var(--shadow);
    transition: 0.2s ease;
    z-index: 998;
}

.admin-button:hover {
    background: rgba(0,0,0,0.55);
}


/* ---------------------------------------------------
   Footer im Textrahmen-Stil
--------------------------------------------------- */
footer {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;
    text-align: center;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 10px 25px var(--shadow);
    font-size: 0.95rem;
    opacity: 0.9;
}

.dark footer {
    background: rgba(30,30,30,0.88);
}

/* Fragebogen Layout */
.form-section {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 10px 25px var(--shadow);
}

.dark .form-section {
    background: rgba(30,30,30,0.88);
}

form label {
    margin-top: 1rem;
    display: block;
    font-weight: bold;
}

form select,
form textarea,
form input[type="text"],
form input[type="email"] {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.4rem;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.btn {
    margin-top: 1.5rem;
    padding: 0.9rem 1.4rem;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: inline-block;
    width: 100%;
    font-size: 1.1rem;
}

.btn:hover {
    background: var(--accent-dark);
}

.btn-grey {
    background: #888;
}

.btn-grey:hover {
    background: #666;
}

.email-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
}

.dark .email-box {
    background: rgba(255,255,255,0.05);
}

.email-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.email-row div {
    flex: 1;
}
/* Fragebogen Layout */
.form-section {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 10px 25px var(--shadow);
}

.dark .form-section {
    background: rgba(30,30,30,0.88);
}

form label {
    margin-top: 1rem;
    display: block;
    font-weight: bold;
}

form select,
form textarea,
form input[type="text"],
form input[type="email"] {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.4rem;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.checkbox-group {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: block;
    margin-bottom: 0.4rem;
}

.btn {
    margin-top: 1.5rem;
    padding: 0.9rem 1.4rem;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: inline-block;
    width: 100%;
    font-size: 1.1rem;
}

.btn:hover {
    background: var(--accent-dark);
}

.btn-grey {
    background: #888;
}

.btn-grey:hover {
    background: #666;
}

.email-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
}

.dark .email-box {
    background: rgba(255,255,255,0.05);
}

.email-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.email-row div {
    flex: 1;
}
/* --- GLOBAL RESPONSIVE LAYOUT --- */

/* Container zentrieren und flexibel machen */
.container,
.form-section,
.chart-box,
.text-box,
.dashboard-container {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Bilder automatisch skalieren */
img {
    max-width: 100%;
    height: auto;
}

/* Buttons flexibel */
.btn {
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
    display: block;
}

/* Tabellen scrollbar auf kleinen Geräten */
table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

/* Checkbox-Gruppen umbrechen */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Email-Row flexibel */
.email-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.email-row div {
    flex: 1 1 100%;
}

/* Dashboard-Kacheln */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* --- MEDIA QUERIES --- */

/* Tablets */
@media (max-width: 900px) {
    .form-section,
    .chart-box,
    .text-box {
        padding: 1.5rem;
    }
}

/* Smartphones */
@media (max-width: 600px) {

    header h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    header p {
        font-size: 1rem;
        text-align: center;
    }

    .form-section {
        padding: 1rem;
        border-radius: 12px;
    }

    label {
        font-size: 1rem;
    }

    select,
    textarea,
    input[type="text"],
    input[type="email"] {
        font-size: 1rem;
        padding: 0.6rem;
    }

    .btn {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .tile {
        padding: 1.2rem;
        font-size: 1rem;
    }

    .tile .badge {
        font-size: 0.8rem;
    }

    .popup-box {
        width: 90%;
        margin: 4rem auto;
        padding: 1.5rem;
    }
}
/* ------------------------------
   RESPONSIVE NAVIGATION
------------------------------ */

.nav {
    width: 100%;
    background: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.dark .nav {
    background: rgba(30,30,30,0.9);
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: 0.2s;
}

.nav-menu li a:hover {
    color: var(--accent);
}

/* Hamburger Button */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--text);
    height: 3px;
    width: 28px;
    border-radius: 3px;
    position: relative;
    transition: 0.3s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    top: 8px;
}

/* ------------------------------
   MOBILE VERSION
------------------------------ */

@media (max-width: 800px) {

    .nav-menu {
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--white);
        width: 100%;
        flex-direction: column;
        gap: 0;
        display: none;
        box-shadow: 0 10px 25px var(--shadow);
    }

    .dark .nav-menu {
        background: rgba(30,30,30,0.95);
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .nav-menu li a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .nav-toggle-label {
        display: block;
    }

    /* Menü öffnen */
    .nav-toggle:checked ~ .nav-menu {
        display: flex;
    }

    /* Hamburger Animation */
    .nav-toggle:checked + .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked + .nav-toggle-label span::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle:checked + .nav-toggle-label span::after {
        transform: rotate(-45deg);
        top: 0;
    }
}
.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.qr-wrapper img {
    width: 80%;
    max-width: 300px;
    height: auto;
}
.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.qr-img {
    width: 80%;
    max-width: 320px;
    height: auto;
}

/* Für Smartphones */
@media (max-width: 600px) {
    .qr-img {
        width: 90%;
        max-width: 260px;
    }
}
