:root {
    --primary: #12372a;
    --primary-2: #1f4f3d;
    --primary-3: #0d241c;
    --accent: #d6a84f;
    --bg: #f4f7f2;
    --card: #ffffff;
    --text: #1d1f1e;
    --muted: #68756e;
    --border: #e1e7df;
    --shadow: 0 18px 45px rgba(18, 55, 42, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(214, 168, 79, .18), transparent 34rem),
        linear-gradient(180deg, #f8faf6 0%, var(--bg) 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.sidebar {
    width: 292px;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    color: #fff;
    padding: 22px 18px;
    background:
        linear-gradient(160deg, rgba(214, 168, 79, .18), transparent 30%),
        linear-gradient(180deg, var(--primary), var(--primary-3));
}

.brand-box {
    padding: 8px 6px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 18px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f3d27d, var(--accent));
    color: #15271f;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: -.05em;
    box-shadow: 0 10px 22px rgba(214, 168, 79, .24);
}

.brand-title {
    display: block;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.brand-subtitle {
    display: block;
    color: rgba(255,255,255,.66);
    font-size: 12px;
    margin-top: 3px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.nav-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.76);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 700;
    transition: .18s ease;
}

.nav-item-custom i {
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.nav-item-custom:hover,
.nav-item-custom.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.nav-item-custom.active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    margin-top: 22px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.09);
}

.main-content {
    margin-left: 292px;
    width: calc(100% - 292px);
    padding: 28px;
}

.topbar {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255,255,255,.84);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px 26px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.eyebrow {
    color: var(--primary-2);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -.05em;
}

.topbar p {
    color: var(--muted);
    margin: 6px 0 0;
    max-width: 760px;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-primary-custom {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-radius: 16px;
    padding: 11px 18px;
    font-weight: 850;
    box-shadow: 0 10px 24px rgba(18, 55, 42, .16);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
}

.stat-card,
.content-card,
.quick-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
    height: 100%;
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
}

.stat-card-top i {
    color: var(--primary-2);
    background: #eef6f1;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.stat-number {
    color: var(--primary);
    font-size: 38px;
    font-weight: 950;
    letter-spacing: -.05em;
    margin: 12px 0 2px;
}

.stat-caption {
    color: var(--muted);
}

.stat-trend {
    margin-top: 12px;
    color: var(--primary-2);
    font-weight: 800;
    font-size: 13px;
}

.content-card {
    padding: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 22px;
    font-weight: 920;
    margin: 0;
    letter-spacing: -.035em;
}

.section-heading p {
    color: var(--muted);
    margin: 4px 0 0;
}

.quick-card {
    padding: 18px;
    height: 100%;
    display: block;
    color: var(--text);
    text-decoration: none;
    transition: .18s ease;
}

.quick-card:hover {
    transform: translateY(-3px);
    border-color: rgba(214, 168, 79, .7);
    color: var(--text);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #eef6f1;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 21px;
    margin-bottom: 12px;
}

.quick-title {
    font-weight: 900;
    margin-bottom: 4px;
}

.quick-text {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.table thead th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom-color: var(--border);
}

.table td {
    vertical-align: middle;
}

.form-control,
.form-select {
    border-radius: 16px;
    border-color: var(--border);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .25rem rgba(214, 168, 79, .18);
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: 0; }

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 7px;
    background: var(--accent);
    flex: 0 0 auto;
}

@media (max-width: 991px) {
    .app-shell { display: block; }

    .sidebar {
        position: static;
        width: 100%;
        border-radius: 0 0 28px 28px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions { width: 100%; }
    .topbar-actions .btn { flex: 1 1 auto; }
}

/* Mobile Optimierung Kundenformulare */
@media (max-width: 575.98px) {
    .main-content {
        padding: 14px;
    }

    .content-card {
        padding: 20px;
        border-radius: 24px;
    }

    .section-heading h2 {
        font-size: 25px;
        line-height: 1.15;
    }

    .section-heading p {
        font-size: 15px;
        line-height: 1.45;
    }

    .form-label {
        font-size: 15px;
        font-weight: 750;
        margin-bottom: 6px;
    }

    .form-control,
    .form-select,
    .form-control-lg,
    .form-select-lg {
        min-height: 48px;
        padding: 10px 14px;
        font-size: 16px;
        border-radius: 15px;
    }

    textarea.form-control {
        min-height: 96px;
    }

    .row.g-3 {
        --bs-gutter-y: 0.85rem;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-number {
        font-size: 30px;
    }

    .table {
        font-size: 14px;
    }
}

