* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0b0f14;
    color: #eaf0f6;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.14), transparent 30%),
        linear-gradient(180deg, #0a0e13 0%, #121923 100%);
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
}

.glow-1 {
    width: 240px;
    height: 240px;
    background: #5b5cf0;
    top: -60px;
    left: -40px;
}

.glow-2 {
    width: 260px;
    height: 260px;
    background: #00c896;
    right: -60px;
    bottom: -40px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.card {
    background: rgba(18, 25, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.login-card {
    padding: 28px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.brand h1 {
    margin: 0;
    font-size: 1.7rem;
}

.brand p {
    margin: 4px 0 0;
    color: #9cabbd;
    font-size: 0.95rem;
}

.brand-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    background: linear-gradient(135deg, #5b5cf0, #00c896);
    color: #fff;
    box-shadow: 0 8px 25px rgba(91, 92, 240, 0.35);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form label {
    font-size: 0.95rem;
    color: #bdd0e5;
    margin-top: 4px;
}

.form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #2a3442;
    background: #0f141c;
    color: #eaf0f6;
    outline: none;
    font-size: 1rem;
    transition: 0.2s ease;
}

.form input:focus {
    border-color: #5b5cf0;
    box-shadow: 0 0 0 4px rgba(91, 92, 240, 0.16);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.15s ease, opacity 0.15s ease;
    margin-top: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #5b5cf0, #00c896);
    color: #fff;
}

.login-note,
.muted,
.subline,
.eyebrow {
    color: #94a6ba;
}

.login-note {
    margin-top: 18px;
    font-size: 0.92rem;
    text-align: center;
}

.alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #cbffd9;
}

.alert-error {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ffd2d2;
}

.app-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.08), transparent 28%),
        linear-gradient(180deg, #0a0e13 0%, #121923 100%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 18px 14px;
    background: rgba(10, 14, 19, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
}

.topbar h1 {
    margin: 0;
    font-size: 1.35rem;
}

.topnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    background: #161d27;
    color: #d9e2ec;
    font-size: 0.95rem;
}

.nav-link.active {
    background: linear-gradient(135deg, #5b5cf0, #00c896);
    color: #fff;
}

.nav-link-danger {
    background: #2a1619;
    color: #ffb6b6;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 16px 28px;
}

.content.narrow {
    max-width: 720px;
}

.hero-card {
    margin-bottom: 18px;
    padding: 26px;
    background:
        linear-gradient(135deg, rgba(91,92,240,0.18), rgba(0,200,150,0.12)),
        rgba(18, 25, 35, 0.92);
}

.hero-card h2 {
    margin: 6px 0 10px;
    font-size: 1.8rem;
}

.grid-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.grid-cards .card h3 {
    margin-top: 0;
}

.btn-inline {
    display: inline-flex;
    width: auto;
    min-height: 42px;
    padding: 10px 16px;
}

.btn-danger {
    background: linear-gradient(135deg, #a91d3a, #e13b5c);
    color: #fff;
}

.btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-top: 0;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #2a3442;
    background: #0f141c;
    color: #eaf0f6;
    outline: none;
    font-size: 1rem;
    transition: 0.2s ease;
    appearance: none;
}

.form-select:focus {
    border-color: #5b5cf0;
    box-shadow: 0 0 0 4px rgba(91, 92, 240, 0.16);
}

.table-card {
    margin-top: 18px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 14px;
    border-radius: 16px;
}

.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: rgba(10, 14, 19, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
}

.admin-table th {
    background: #161d27;
    color: #cfe0f2;
    font-size: 0.95rem;
}

.admin-table td {
    color: #eaf0f6;
    font-size: 0.94rem;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: bold;
    line-height: 1;
}

.badge-admin {
    background: rgba(91, 92, 240, 0.18);
    color: #c9ccff;
    border: 1px solid rgba(91, 92, 240, 0.34);
}

.badge-user {
    background: rgba(0, 200, 150, 0.14);
    color: #c9ffee;
    border: 1px solid rgba(0, 200, 150, 0.28);
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #c7d2de;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 92, 240, 0.18);
}

.footer {
    width: 100%;
    margin-top: auto;
    padding: 10px 12px;
    background: #0a0e13;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.footer-inner {
    font-size: 0.8rem;
    color: #8ea0b5;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer a {
    color: #9fb3c8;
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer a:hover {
    color: #fff;
}

textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #2a3442;
    background: #0f141c;
    color: #eaf0f6;
    outline: none;
    font-size: 1rem;
    transition: 0.2s ease;
    resize: vertical;
    min-height: 140px;
}

textarea:focus {
    border-color: #5b5cf0;
    box-shadow: 0 0 0 4px rgba(91, 92, 240, 0.16);
}

.hp-wrap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-secondary {
    background: linear-gradient(135deg, #2c3e50, #3b5168);
    color: #fff;
}

.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.row-unread td {
    background: rgba(91, 92, 240, 0.06);
}

.badge-read {
    background: rgba(120, 130, 145, 0.16);
    color: #d8e0ea;
    border: 1px solid rgba(120, 130, 145, 0.26);
}

.badge-unread {
    background: rgba(255, 193, 7, 0.14);
    color: #ffe7a3;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.admin-overview {
    margin-top: 18px;
}

.admin-quicklinks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #e13b5c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 1;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    line-height: 1.5;
    cursor: pointer;
}

.check-row input[type="checkbox"] {
    margin-top: 3px;
    transform: scale(1.2);
    accent-color: #5b5cf0;
}

.check-card {
    display: block;
    margin-top: 12px;
    cursor: pointer;
}

.check-card input {
    display: none;
}

.check-card-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0f141c, #0b1017);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s ease;
}

.check-card:hover .check-card-box {
    border-color: rgba(91, 92, 240, 0.5);
    background: linear-gradient(145deg, #111827, #0d131c);
}

.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #5b5cf0;
    flex-shrink: 0;
    position: relative;
    margin-top: 3px;
    transition: 0.2s;
}

.check-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.check-content p {
    margin: 0;
    font-size: 0.88rem;
    color: #9fb3c8;
    line-height: 1.5;
}

/* CHECKED STATE */
.check-card input:checked + .check-card-box {
    border-color: #5b5cf0;
    background: linear-gradient(145deg, #151c2b, #0f1520);
    box-shadow: 0 0 0 2px rgba(91,92,240,0.2);
}

.check-card input:checked + .check-card-box .check-icon {
    background: #5b5cf0;
    border-color: #5b5cf0;
}

.check-card input:checked + .check-card-box .check-icon::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===========================
   NEUE ZENTRALE HEADER / BURGER NAV
=========================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 19, 0.94);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 64px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #eaf0f6;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: linear-gradient(135deg, #5b5cf0, #00c896);
    color: #fff;
    box-shadow: 0 8px 25px rgba(91, 92, 240, 0.28);
    flex-shrink: 0;
}

.brand-text {
    font-size: 1rem;
    color: #eaf0f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-shrink: 0;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: #161d27;
    color: #eaf0f6;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
    background: #1c2531;
    border-color: rgba(255,255,255,0.14);
}

.icon-btn:active {
    transform: scale(0.97);
}

.mobile-nav-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 45;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px 14px;
    flex-direction: column;
    gap: 8px;
    background: rgba(10, 14, 19, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

.mobile-nav-panel.is-open {
    display: flex;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    background: #161d27;
    color: #d9e2ec;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}

.mobile-nav-link:hover {
    background: #1c2531;
}

.mobile-nav-link:active {
    transform: scale(0.99);
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, #5b5cf0, #00c896);
    color: #fff;
}

.profile-menu-wrap {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 240px;
    background: #121923;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    padding: 10px;
    display: none;
    z-index: 60;
}

.profile-dropdown.is-open {
    display: block;
}

.profile-dropdown-head {
    padding: 10px 12px 12px;
    margin-bottom: 6px;
    color: #9fb3c8;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.9rem;
    line-height: 1.5;
}

.dropdown-link {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #eaf0f6;
    text-decoration: none;
    transition: background 0.18s ease;
}

.dropdown-link:hover {
    background: rgba(255,255,255,0.05);
}

.dropdown-link-danger {
    color: #ffb6b6;
}

.message-box {
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    background: #0f141c;
    border: 1px solid rgba(255,255,255,0.06);
    color: #eaf0f6;
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
}

.inline-edit-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-edit-form input[type="date"] {
    min-width: 145px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #2a3442;
    background: #0f141c;
    color: #eaf0f6;
}


@media (min-width: 780px) {
    .grid-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topnav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .nav-link {
        text-align: center;
    }

    .card {
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        padding: 10px 12px;
        min-height: 60px;
    }

    .brand-text {
        font-size: 0.95rem;
        max-width: 140px;
    }

    .brand-logo,
    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .mobile-nav-panel {
        padding: 10px 12px 14px;
    }

    .profile-dropdown {
        width: min(240px, calc(100vw - 24px));
        right: 0;
    }
}