/* =========================================================
   NaturEntdecker Admin UI – Calm / Professional Theme
   ========================================================= */

:root {
    /* ===== Color System (calm / space inspired) ===== */

    --nd-bg: #D3DCE1; /* page background */
    --nd-surface: #ffffff; /* cards */
    --nd-surface-soft: rgba(255,255,255,.75);
    --nd-primary: #0F1426; /* deep navy */
    --nd-primary-2: #324669; /* slate */
    --nd-accent: #7F9EB2; /* muted blue */
    --nd-danger: #B85A2B;
    --nd-warn: #D18B2C;
    --nd-text: #0F1426;
    --nd-muted: rgba(15,20,38,.62);
    --nd-line: rgba(15,20,38,.10);
    /* ===== Layout System ===== */

    --nd-gap: 1rem;
    --nd-gap-sm: .75rem;
    --nd-gap-xs: .5rem;
    --nd-radius: 12px;
    --nd-radius-sm: 10px;
    --nd-shadow: 0 10px 22px rgba(15,20,38,.10);
    --nd-shadow-sm: 0 6px 14px rgba(15,20,38,.08);
    --nd-focus: 0 0 0 .22rem rgba(127,158,178,.28);
}

/* =========================================================
   Base
   ========================================================= */

html, body {
    height: 100%;
}

body {
    background: var(--nd-bg);
    color: var(--nd-text);
}

/* Bootstrap container stabilisieren */
.container,
.container-fluid {
    padding-left: 12px;
    padding-right: 12px;
}

/* Links */
a {
    color: var(--nd-primary-2);
}

    a:hover {
        color: var(--nd-primary);
    }

/* =========================================================
   Layout Shell
   ========================================================= */

.nd-shell {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.nd-main {
    flex: 1 0 auto;
    padding: 1.25rem 0;
}

/* Gleichmäßige vertikale Abstände */
.nd-page {
    display: flex;
    flex-direction: column;
    gap: var(--nd-gap);
}

.nd-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--nd-line);
    background: rgba(255,255,255,.65);
}

/* =========================================================
   Topbar
   ========================================================= */

.nd-topbar {
    background: var(--nd-primary);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.nd-brand {
    font-weight: 700;
    letter-spacing: .1px;
}

.nd-topnav .nav-link {
    color: rgba(255,255,255,.78);
    border-radius: 10px;
    padding: .45rem .65rem;
}

    .nd-topnav .nav-link:hover {
        color: #fff;
        background: rgba(255,255,255,.08);
    }

    .nd-topnav .nav-link.active {
        color: #fff;
        background: rgba(127,158,178,.22);
        border: 1px solid rgba(127,158,178,.35);
    }

/* ===== Header / Topbar (max 1440px + responsive hamburger) ===== */

.nd-topbar {
    background: var(--nd-primary);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.nd-topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: .75rem 12px;
}

.nd-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nd-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.nd-brandwrap {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: .1px;
    white-space: nowrap;
}

.nd-brand-sub {
    font-weight: 600;
    opacity: .75;
}

.nd-pagehead {
    min-width: 0;
}

.nd-pagetitle {
    font-weight: 650;
    line-height: 1.1;
}

.nd-pagesub {
    opacity: .75;
    font-size: .88rem;
    line-height: 1.2;
}

/* Desktop nav */
.nd-topnav {
    align-items: center;
}

.nd-topnav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nd-toplink {
    display: inline-flex;
    align-items: center;
    padding: .5rem .65rem;
    border-radius: 10px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    border: 1px solid transparent;
}

    .nd-toplink:hover {
        color: #fff;
        background: rgba(255,255,255,.08);
    }

    .nd-toplink.active {
        color: #fff;
        background: rgba(127,158,178,.22);
        border-color: rgba(127,158,178,.35);
    }

/* Burger */
.nd-burger {
    width: 44px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
}

    .nd-burger span {
        display: block;
        height: 2px;
        background: rgba(255,255,255,.9);
        border-radius: 999px;
    }

/* Mobile collapse styling */
@media (max-width: 767.98px) {

    .nd-topnav.collapse,
    .nd-topnav.collapsing {
        width: 100%;
    }

    .nd-topnav-list {
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        padding: .75rem 0 0 0;
    }

    .nd-toplink {
        justify-content: space-between;
        width: 100%;
        padding: .6rem .75rem;
        border: 1px solid rgba(255,255,255,.10);
        background: rgba(255,255,255,.04);
    }

    .nd-pagehead-mobile {
        padding-top: .5rem;
    }
}

/* =========================================================
   Sidebar
   ========================================================= */

.nd-sidebar {
    background: var(--nd-surface-soft);
    border: 1px solid var(--nd-line);
    border-radius: var(--nd-radius);
    box-shadow: var(--nd-shadow-sm);
    position: sticky;
    top: 1rem;
    margin-bottom: var(--nd-gap);
}

.nd-sidehead {
    padding: .9rem .95rem .6rem;
    border-bottom: 1px solid var(--nd-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nd-sidenav {
    padding: .65rem;
}

    .nd-sidenav .nav-link {
        color: var(--nd-text);
        border-radius: 10px;
        padding: .55rem .65rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
    }

        .nd-sidenav .nav-link small {
            color: var(--nd-muted);
        }

        .nd-sidenav .nav-link:hover {
            background: rgba(15,20,38,.04);
        }

        .nd-sidenav .nav-link.active {
            background: rgba(127,158,178,.16);
            border: 1px solid rgba(127,158,178,.28);
        }

/* =========================================================
   Cards
   ========================================================= */

.nd-card {
    background: var(--nd-surface);
    border: 1px solid var(--nd-line);
    border-radius: var(--nd-radius);
    box-shadow: var(--nd-shadow-sm);
}

.nd-card-header {
    border-bottom: 1px solid var(--nd-line);
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.nd-card-body {
    padding: 1rem;
}

.nd-title {
    font-weight: 700;
    letter-spacing: .1px;
}

.nd-kicker {
    font-size: .88rem;
    color: var(--nd-muted);
}

/* =========================================================
   Dashboard Grid
   ========================================================= */

.nd-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--nd-gap);
}

@media (max-width: 1200px) {
    .nd-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .nd-tiles {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Lists / Rows
   ========================================================= */

.nd-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.nd-row {
    border: 1px solid var(--nd-line);
    border-radius: var(--nd-radius-sm);
    padding: .85rem .95rem;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

    .nd-row:hover {
        box-shadow: 0 8px 18px rgba(15,20,38,.08);
        border-color: rgba(15,20,38,.16);
        transform: none;
    }

/* =========================================================
   Badges
   ========================================================= */

.nd-badge {
    font-weight: 600;
    border-radius: 10px;
    padding: .22rem .5rem;
    background: rgba(127,158,178,.18);
    color: #0b0f1d;
    border: 1px solid rgba(127,158,178,.28);
}

    .nd-badge.draft {
        background: rgba(209,139,44,.16);
        color: #6a3f08;
        border-color: rgba(209,139,44,.26);
    }

/* =========================================================
   Buttons
   ========================================================= */

.btn-nd-primary {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
}

    .btn-nd-primary:hover {
        background: #0b0f1d;
        border-color: #0b0f1d;
        color: #fff;
    }

.btn-nd-accent {
    background: var(--nd-accent);
    border-color: var(--nd-accent);
    color: #0b0f1d;
}

    .btn-nd-accent:hover {
        background: #6f8ea1;
        border-color: #6f8ea1;
        color: #0b0f1d;
    }

.btn-nd-danger {
    background: var(--nd-danger);
    border-color: var(--nd-danger);
    color: #fff;
}

    .btn-nd-danger:hover {
        background: #a64f25;
        border-color: #a64f25;
        color: #fff;
    }

.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: var(--nd-focus);
    border-color: rgba(127,158,178,.55);
}

/* Konsistente Höhen */
.btn,
.form-control,
.form-select {
    line-height: 1.2;
}
