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

body {
    background: #f3f6fb;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* ===========================
   CONTENT BOX
=========================== */
.card {
    background: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
}

.card h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ===========================
   FORMULAR
=========================== */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

input:focus {
    border-color: #0077ff;
}

button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #0077ff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #005ed1;
}

/* ===========================
   FOOTER
=========================== */
footer {
    background: #111827;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    margin-top: auto;
}

/* ===========================
   TABLES & ADMIN
=========================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

th {
    background: #f1f5f9;
    font-weight: 700;
}

table tbody tr {
    vertical-align: middle;
}

table tbody td.actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.actions .btn {
    text-align: center;
}

.actions .btn {
    flex: 1; /* gleiche Breite */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

.btn {
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    display: inline-block;
    transition: 0.2s;
}

.btn-edit {
    background: #facc15;
    color: #111;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-add {
    background: #22c55e;
    color: white;
    margin-top: 10px;
    display: inline-block;
}

/* ===========================
   ICON BUTTONS
=========================== */

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
}

/* neue Farbe für verbinden */
.btn-link {
    background: #6366f1;
    color: white;
}

.btn-link:hover {
    background: #4f46e5;
}

@media(max-width: 480px) {
    .btn-icon span {
        display: none;
    }

    .btn-icon {
        width: 38px;
        height: 38px;
        padding: 0;
    }

    .catch-card .actions {
        justify-content: flex-start;
    }
}

img.catch-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
}

/* ===========================
   MOBILE CARDS
=========================== */
.user-card,
.catch-card,
.permit-card {
    display: none;
}

@media(max-width: 768px) {
    .table-container {
        display: none;
    }

    .user-card,
    .catch-card,
    .permit-card {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #f9fafb;
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    .user-card p,
    .catch-card p,
    .permit-card p {
        margin: 5px 0;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
    }

    .user-card p span.label,
    .catch-card p span.label,
    .permit-card p span.label {
        font-weight: 600;
        color: #555;
    }

    .user-card .actions,
    .catch-card .actions,
    .permit-card .actions {
        margin-top: 8px;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ===========================
   PREMIUM-BOX & BUTTONS
=========================== */
.premium-box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: auto;
    text-align: center;
}

.premium-box ul {
    text-align: left;
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.premium-buttons {
    padding: 12px 18px;
    background: #0077ff;
    color: white;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}

.premium-buttons:hover {
    background: #005ed1;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.button-center {
    display: flex;
    justify-content: center;
    gap: 10px; /* Abstand zwischen den Buttons */
    margin-top: 15px;
}

.premium-box p.notice {
    color: gray;
    font-size: 13px;
}

.premium-features {
    text-align: left;
    padding-left: 150px !important;
    margin-top: 10px;
    margin-bottom: 20px;
    list-style-type: disc;
}

/* ===========================
   LIGHTBOX
=========================== */
#imgModal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

#imgModal img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
}

#imgModal span.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#imgModal span.close:hover {
    color: #ddd;
}

/* ===========================
   NAVBAR (NEU)
=========================== */
.navbar {
    background: linear-gradient(90deg, #0052cc, #0077ff);
    padding: 14px 18px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand {
    color: white;
    text-decoration: none;
    font-size: 30px;
    font-weight: 800;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-right a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    padding: 8px 10px;
    border-radius: 10px;
}

.nav-right a:hover {
    background: rgba(255,255,255,0.12);
}

/* Premium Link rot */
.nav-premium {
    background: #ef4444;
    color: white !important;
}

.nav-premium:hover {
    background: #dc2626 !important;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 26px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropbtn {
    background: transparent;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    padding: 8px 10px;
    border-radius: 10px;
}

.dropbtn:hover {
    background: rgba(255,255,255,0.12);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background: white;
    min-width: 220px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.15);
    z-index: 999;
}

.dropdown-content a {
    display: block;
    padding: 12px 14px;
    color: #111827 !important;
    background: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0;
}

.dropdown-content a:hover {
    background: #f1f5f9;
}

/* Dropdown sichtbar */
.dropdown-content.show {
    display: block;
}

/* ===========================
   PREMIUM NAV ZEILE (2. Reihe)
=========================== */
.nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.nav-premium-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: 0.95;
}

.nav-premium-row a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    transition: 0.2s;
    background: rgba(255,255,255,0.10);
}

.nav-premium-row a:hover {
    background: rgba(255,255,255,0.18);
}

/* ===========================
   MOBILE NAV (nur Logo + ☰)
=========================== */
@media(max-width: 768px) {

    .nav-toggle {
        display: block;
    }

    /* Menü standardmäßig komplett verstecken */
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -280px;
        height: 100vh;
        width: 280px;
        background: linear-gradient(180deg, #0052cc, #0077ff);

        display: flex;
        flex-direction: column;
        align-items: flex-start;

        padding-top: 70px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 120px;

        gap: 1px;

        transition: right 0.3s ease;
        z-index: 9999;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-wrapper::-webkit-scrollbar {
        width: 6px;
    }

    .nav-wrapper::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.35);
        border-radius: 10px;
    }

    /* Menü sichtbar wenn aktiv */
    .nav-wrapper.active {
        right: 0;
    }

    /* Links im Menü */
    .nav-right {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 2px;
    }

    .nav-right a {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
    }

    /* Dropdown Profil */
    .dropdown {
        width: 100%;
    }

    .dropbtn {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background: rgba(255,255,255,0.12);
        margin-top: 6px;
        border-radius: 12px;
        display: none;
    }

    .dropdown-content.show {
        display: block;
    }

    .dropdown-content a {
        color: white;
        padding: 10px 14px;
        font-weight: 600;
    }

    .dropdown-content a:hover {
        background: rgba(255,255,255,0.12);
    }

    /* Premium-Zeile im Drawer */
    .nav-premium-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .nav-premium-row a {
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
        background: rgba(255,255,255,0.12);
        text-decoration: none;
        font-weight: 600;
        color: white;
    }

    .nav-premium-row a:hover {
        background: rgba(255,255,255,0.18);
    }
}

/* Overlay hinter dem Mobile Menü */
.nav-overlay {
    display: none;
}

@media(max-width: 768px) {
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.45);
        z-index: 9998;
        display: none;
    }

    .nav-overlay.active {
        display: block;
    }
}

.premium-dropdown .dropbtn {
    background: rgba(255,255,255,0.10);
    color: white;
    font-size: 0.8rem;
}

.premium-dropdown .dropbtn:hover {
    background: rgba(255,255,255,0.18);
}

textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    width: 100%;
}

textarea:focus {
    border-color: #0077ff;
}

.koeder-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.koeder-button {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

a[href*="openstreetmap"] {
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
}

/* =========================
   PDF-EXPORT
========================= */
.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 25px 0;
}

.filter-form label {
    font-weight: 600;
}

.filter-form select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.export-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.export-box h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.export-box p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.export-box .btn {
    align-self: flex-start;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form select {
        width: 100%;
    }

    .export-box .btn {
        width: 100%;
        text-align: center;
    }
}

.cookie-banner {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 14px 16px;
    z-index: 99999;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-content a {
    color: #7ec8ff;
    text-decoration: underline;
}

.cookie-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.cookie-btn:hover {
    background: #218838;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-top: 25px;
}

.contact-info-box {
    background: #f4f8f5;
    border-left: 5px solid #0077ff;
    padding: 20px;
    border-radius: 10px;
}

.contact-info-box h2 {
    margin-top: 0;
}

.contact-form {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(40,167,69,0.15);
}

.contact-submit {
    width: 100%;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

.success-box {
    background: #e6f9ec;
    border-left: 5px solid #0077ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

.request-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.request-search input {
    flex: 1;
    min-width: 240px;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.request-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.request-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 5px solid #28a745;
}

.request-card.unread {
    border-left-color: #ffc107;
    background: #fffdf3;
}

.request-card.read {
    opacity: 0.92;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.request-date {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.request-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.unread-badge {
    background: #ffc107;
    color: #222;
}

.read-badge {
    background: #e6e6e6;
    color: #555;
}

.request-meta p {
    margin: 4px 0;
    font-size: 14px;
}

.request-message {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    white-space: pre-line;
    line-height: 1.5;
}

.request-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.request-actions form {
    margin: 0;
}

.error-box {
    background: #fdeaea;
    border-left: 5px solid #dc3545;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .request-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-actions {
        flex-direction: column;
    }

    .request-actions .btn,
    .request-actions button {
        width: 100%;
        text-align: center;
    }
}

.action-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-group form {
    margin: 0;
}

.action-group button {
    white-space: nowrap;
}

.weather-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.weather-form input {
    flex: 1;
    min-width: 240px;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.weather-result {
    margin-top: 25px;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.weather-box {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 5px solid #28a745;
}

.weather-box span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.weather-box strong {
    font-size: 20px;
}

.weather-time {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
}

@media (max-width: 900px) {
    .weather-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .weather-grid {
        grid-template-columns: 1fr;
    }

    .weather-form {
        flex-direction: column;
    }

    .weather-form button {
        width: 100%;
    }
}

.weather-box small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #555;
}

.rating-good {
    border-left-color: #28a745;
    background: #eefaf1;
}

.rating-medium {
    border-left-color: #ffc107;
    background: #fff9e6;
}

.rating-bad {
    border-left-color: #dc3545;
    background: #fdecec;
}

.weather-clear {
    border-left-color: #ffc107;
    background: #fff9e6;
}

.weather-clouds {
    border-left-color: #6c757d;
    background: #f1f3f5;
}

.weather-rain {
    border-left-color: #0d6efd;
    background: #eaf3ff;
}

.weather-snow {
    border-left-color: #8ecae6;
    background: #f0fbff;
}

.weather-thunder {
    border-left-color: #6f42c1;
    background: #f4efff;
}

@media(max-width: 768px) {

    .nav-wrapper {
        gap: 4px !important;
    }

    .nav-right,
    .nav-premium-row {
        gap: 3px !important;
    }

    .nav-right a,
    .nav-premium-row a,
    .dropbtn {
        padding-top: 7px !important;
        padding-bottom: 7px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    .dropdown-content {
        margin-top: 3px !important;
    }

    .dropdown-content a {
        padding-top: 7px !important;
        padding-bottom: 7px !important;
    }
}