/* Ergaenzungen zu Bootstrap 5 - modernes, etwas rockigeres Farb-/Formsystem */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #e63462;
    --brand-dark: #c62353;
    --brand-glow: rgba(230, 52, 98, 0.2);
    --accent: #ffb703;

    --sidebar-bg: #16161f;
    --sidebar-bg-soft: #21212e;

    --bg: #f5f5fa;
    --surface: #ffffff;
    --surface-2: #fbe7ec;
    --border: #eae7ee;
    --text: #201f2b;
    --text-muted: #706d7c;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(32, 31, 43, 0.04), 0 8px 24px rgba(32, 31, 43, 0.07);
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.page-header h1,
.sidebar .brand {
    font-family: 'Poppins', 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #fff;
    min-height: 100vh;
    padding: 4px 12px;
}

.sidebar .brand {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    padding: 22px 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .brand::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: inline-block;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 2px;
    font-size: 0.93rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar .nav-link:hover {
    background: var(--sidebar-bg-soft);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

.sidebar .nav-link-child {
    padding: 8px 14px 8px 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.48);
    margin-bottom: 0;
}

.sidebar .nav-link-child:hover {
    color: #fff;
}

.sidebar .nav-link-child.active {
    background: var(--sidebar-bg-soft);
    color: var(--accent);
    font-weight: 600;
}

/* --- Mobile: Sidebar als Off-Canvas-Menue --- */

.mobile-topbar {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--sidebar-bg);
        color: #fff;
        padding: 12px 16px;
        position: sticky;
        top: 0;
        z-index: 1050;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        line-height: 1;
        padding: 4px 8px;
        cursor: pointer;
    }

    .mobile-topbar-title {
        font-weight: 700;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 240px;
        height: 100vh;
        z-index: 1060;
        transition: left 0.25s ease;
        overflow-y: auto;
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1055;
    }

    .main-content {
        width: 100%;
    }

    .page-header {
        padding: 22px 18px;
        border-radius: 0;
    }

    .content-inner {
        padding: 0 16px 32px;
    }
}

/* --- Hauptbereich --- */

.main-content {
    flex: 1;
    min-width: 0;
}

.page-header {
    background: linear-gradient(120deg, var(--brand) 0%, #ff7a59 100%);
    color: #fff;
    padding: 30px 32px;
    margin-bottom: 28px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 10px 28px -12px rgba(230, 52, 98, 0.5);
}

.page-kicker {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    opacity: 0.8;
    margin-bottom: 4px;
}

.page-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.page-header .subtitle {
    opacity: 0.88;
    font-size: 0.92rem;
    margin-top: 2px;
}

.content-inner {
    padding: 0 32px 40px;
}

/* --- Karten --- */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border);
}

/* --- Formulare --- */

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-glow);
}

.form-control[disabled],
.form-control[readonly] {
    background: #eef0f5;
    color: var(--text-muted);
    opacity: 1;
}

.form-control::placeholder {
    color: #9a9db3;
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px var(--brand-glow);
}

/* --- Buttons --- */

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
}

.btn-sm {
    border-radius: 8px;
    padding: 5px 10px;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 6px 16px -6px rgba(230, 52, 98, 0.55);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-primary {
    border-width: 1.5px;
}

/* --- Tabellen --- */

.table thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    padding: 12px 16px;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: var(--border);
}

.table-hover tbody tr:hover {
    background-color: var(--surface-2);
}

/* --- Badges --- */

.badge {
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 999px;
}

/* --- Login --- */

.auth-card {
    max-width: 380px;
    margin: 80px auto;
}

.auth-card .card {
    border: none;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-weight: 700;
    letter-spacing: -0.01em;
    font-family: 'Poppins', 'Inter', sans-serif;
}

/* --- Sonstiges --- */

.slider-thumb {
    width: 100px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

a {
    color: var(--brand-dark);
}

.form-text {
    color: var(--text-muted);
}

/* --- Dropzone (upload.php) --- */

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.dragover {
    border-color: var(--brand);
    background: var(--brand-glow);
}

.dropzone .dz-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 8px;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.file-row .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
