:root {
    --inventa-red: #a20000;
    --inventa-red-dark: #760000;
    --inventa-red-soft: #fff1f1;
    --inventa-ink: #1f2937;
    --inventa-muted: #6b7280;
    --inventa-surface: #ffffff;
    --inventa-surface-soft: #f8fafc;
    --inventa-border: #e5e7eb;
}

html {
    background: #f4f6f8;
}

body {
    color: var(--inventa-ink);
    background:
        radial-gradient(circle at 8% 0%, rgba(162, 0, 0, 0.08), transparent 26rem),
        linear-gradient(180deg, #f8f9fb 0%, #f3f5f7 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    border-top: 4px solid var(--inventa-red);
    z-index: 1100;
    pointer-events: none;
}

.card,
.login-container {
    border-color: rgba(162, 0, 0, 0.16) !important;
    box-shadow: 0 12px 34px rgba(31, 41, 55, 0.10), 0 2px 8px rgba(31, 41, 55, 0.06) !important;
}

.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fffefe 100%);
    border-radius: 14px;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    border-top: 5px solid var(--inventa-red);
    z-index: 1;
    pointer-events: none;
}

.cardrand {
    border-color: rgba(162, 0, 0, 0.30) !important;
}

.card-body,
.card-footer {
    position: relative;
    z-index: 2;
}

.card-footer {
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f8 100%);
    border-top-color: #e5e7eb;
}

.navbar-custom {
    background: linear-gradient(135deg, var(--inventa-red-dark), var(--inventa-red)) !important;
    box-shadow: 0 8px 24px rgba(118, 0, 0, 0.22);
    border-radius: 0 0 12px 12px;
}

.bg-dark {
    background: linear-gradient(135deg, #20242b, #111827) !important;
}

.btn {
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.10);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn:hover,
.btn:focus {
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.15);
    filter: brightness(1.03);
}

.btn-primary,
.suchleiste2 {
    background: linear-gradient(135deg, var(--inventa-red-dark), var(--inventa-red)) !important;
    border-color: var(--inventa-red-dark) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #5f6875, #3f4752);
    border-color: #3f4752;
}

.btn-success,
.input-group .increase {
    background: linear-gradient(135deg, #16803f, #0f9f4f) !important;
    border-color: #13763b !important;
}

.btn-danger,
.input-group .decrease {
    background: linear-gradient(135deg, #7d0000, var(--inventa-red)) !important;
    border-color: #760000 !important;
}

.form-control {
    border-color: #cfd5dc;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(31, 41, 55, 0.04);
}

.form-control:focus {
    border-color: var(--inventa-red);
    box-shadow: 0 0 0 .2rem rgba(162, 0, 0, 0.12);
}

.table {
    background: var(--inventa-surface);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

.table thead th {
    color: #fff;
    background: linear-gradient(180deg, #2b313a, #1c2128);
    border-color: #343b46;
    vertical-align: middle;
}

.table td {
    border-color: #e6e9ed;
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.pagination .page-link {
    color: var(--inventa-red);
    border-color: #d9dde2;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.05);
}

.pagination .page-link:hover {
    color: #fff;
    background: var(--inventa-red);
    border-color: var(--inventa-red);
}

.location-chip,
.last-order-chip {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    border: 1px solid rgba(162, 0, 0, 0.18);
    border-radius: 999px;
    background: var(--inventa-red-soft);
    color: #7d0000;
    font-weight: 700;
    padding: .35rem .7rem;
    box-shadow: 0 2px 8px rgba(162, 0, 0, 0.06);
}

.last-order-line {
    color: #374151;
    font-weight: 600;
    border-left: 4px solid var(--inventa-red);
    background: #fff7f7;
    padding: .55rem .75rem;
    margin: .35rem 0 .85rem;
    border-radius: 0 8px 8px 0;
}

.last-order-line .last-order-location {
    color: var(--inventa-red-dark);
    font-weight: 800;
}

.employee-card .card-header {
    background: linear-gradient(135deg, #252b33, #161b22);
    color: #fff;
    border-bottom: 0;
}

.employee-row {
    background: #fff;
    border: 1px solid var(--inventa-border);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(31, 41, 55, 0.05);
}

.muted-note {
    color: var(--inventa-muted);
}

.alert-success {
    border-color: rgba(22, 128, 63, 0.24);
    box-shadow: 0 4px 14px rgba(22, 128, 63, 0.08);
}

.alert-danger {
    border-color: rgba(162, 0, 0, 0.22);
    box-shadow: 0 4px 14px rgba(162, 0, 0, 0.08);
}

.login-image {
    box-shadow: inset -18px 0 35px rgba(0, 0, 0, 0.10);
}

.login-form img {
    filter: drop-shadow(0 6px 12px rgba(31, 41, 55, 0.10));
}


@media print {
    body {
        background: #fff !important;
    }

    body::before,
    .card::before {
        display: none !important;
    }

    .card,
    .table {
        box-shadow: none !important;
    }
}

/* =========================================================
   InventaOne App Shell
   ========================================================= */
:root {
    --io-navy: #111827;
    --io-navy-2: #1f2937;
    --io-blue: #2563eb;
    --io-red: #a20000;
    --io-bg: #f4f6fa;
    --io-border: #e5e7eb;
    --io-text: #111827;
    --io-muted: #6b7280;
}

.io-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--io-border);
    box-shadow: 0 8px 30px rgba(17, 24, 39, .08);
    backdrop-filter: blur(14px);
}

.io-topbar-inner {
    max-width: 1440px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.io-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--io-text);
    text-decoration: none !important;
    white-space: nowrap;
}

.io-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #760000, #b20b0b);
    box-shadow: 0 8px 18px rgba(162, 0, 0, .22);
}

.io-brand-word {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -.035em;
}
.io-brand-word span { color: var(--io-red); }

.io-desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.io-nav-link,
.io-nav-menu > summary {
    min-height: 42px;
    padding: 0 13px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    list-style: none;
    transition: .16s ease;
}
.io-nav-menu > summary::-webkit-details-marker,
.io-user-menu > summary::-webkit-details-marker,
.io-mobile-menu > summary::-webkit-details-marker { display: none; }

.io-nav-link:hover,
.io-nav-link.active,
.io-nav-menu > summary:hover,
.io-nav-menu[data-active="1"] > summary {
    color: var(--io-red);
    background: #fff1f1;
}

.io-nav-menu,
.io-user-menu,
.io-mobile-menu { position: relative; }

.io-nav-menu-panel,
.io-user-panel,
.io-mobile-panel {
    position: absolute;
    top: calc(100% + 10px);
    min-width: 230px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--io-border);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(17, 24, 39, .14);
}
.io-nav-menu-panel { left: 0; }

.io-nav-menu-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #374151;
    font-weight: 650;
    text-decoration: none !important;
}
.io-nav-menu-panel a:hover,
.io-nav-menu-panel a.active { background: #f7f7f9; color: var(--io-red); }
.io-nav-icon { width: 22px; text-align: center; opacity: .9; }
.io-chevron { margin-left: 3px; opacity: .55; }

.io-user-menu > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    border-radius: 12px;
    padding: 7px 9px;
}
.io-user-menu > summary:hover { background: #f5f6f8; }
.io-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--io-navy);
    font-weight: 800;
}
.io-user-copy { display: flex; flex-direction: column; line-height: 1.05; }
.io-user-copy strong { font-size: .9rem; }
.io-user-copy small { margin-top: 5px; color: var(--io-muted); font-size: .74rem; }
.io-user-panel { right: 0; min-width: 210px; }
.io-user-panel-head { padding: 8px 10px 12px; border-bottom: 1px solid var(--io-border); display: flex; flex-direction: column; gap: 3px; }
.io-user-panel-head span { color: var(--io-muted); font-size: .82rem; }
.io-user-panel a { display: block; margin-top: 7px; padding: 9px 10px; border-radius: 8px; color: var(--io-red); font-weight: 700; text-decoration: none !important; }
.io-user-panel a:hover { background: #fff1f1; }

.io-mobile-menu { display: none; margin-left: auto; }
.io-mobile-menu > summary {
    width: 42px;
    height: 42px;
    border: 1px solid var(--io-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    list-style: none;
}
.io-mobile-panel { right: 0; min-width: 280px; max-height: 75vh; overflow: auto; }
.io-mobile-group { padding: 7px 4px; border-bottom: 1px solid var(--io-border); }
.io-mobile-group > span { display: block; padding: 5px 8px; color: var(--io-muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.io-mobile-group a,
.io-mobile-logout { display: block; padding: 10px 9px; border-radius: 8px; color: #374151; text-decoration: none !important; font-weight: 650; }
.io-mobile-group a.active { color: var(--io-red); background: #fff1f1; }
.io-mobile-logout { color: var(--io-red); margin-top: 6px; }

.io-page {
    max-width: 1380px;
    margin: 0 auto;
    padding: 30px 24px 54px;
}
.io-page-title { font-weight: 800; letter-spacing: -.04em; margin-bottom: 4px; }
.io-page-subtitle { color: var(--io-muted); margin-bottom: 0; }

.io-dashboard-hero {
    padding: 28px 30px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(120deg, #111827 0%, #1f2937 68%, #760000 140%);
    box-shadow: 0 22px 55px rgba(17, 24, 39, .18);
    overflow: hidden;
    position: relative;
}
.io-dashboard-hero::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    right: -70px;
    top: -110px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.io-dashboard-hero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.io-dashboard-hero p { color: rgba(255,255,255,.72); margin: 0; }
.io-dashboard-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.11); font-size: .82rem; font-weight: 700; }

.io-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.io-stat-card {
    min-height: 145px;
    padding: 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--io-border);
    box-shadow: 0 10px 28px rgba(17,24,39,.07);
    position: relative;
    overflow: hidden;
}
.io-stat-card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, #760000, #c01919); }
.io-stat-label { color: var(--io-muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.io-stat-value { margin-top: 14px; font-size: 2rem; font-weight: 850; letter-spacing: -.045em; color: var(--io-text); }
.io-stat-meta { margin-top: 5px; color: var(--io-muted); font-size: .82rem; }

.io-section-title { margin: 32px 0 14px; font-size: 1rem; font-weight: 850; color: #374151; text-transform: uppercase; letter-spacing: .05em; }
.io-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.io-quick-card {
    display: block;
    min-height: 130px;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--io-border);
    color: var(--io-text);
    text-decoration: none !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.io-quick-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(17,24,39,.10); border-color: #d1d5db; color: var(--io-text); }
.io-quick-icon { width: 40px; height: 40px; border-radius: 11px; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; font-weight: 900; }
.io-quick-card strong { display: block; font-size: 1rem; }
.io-quick-card span { display: block; margin-top: 5px; color: var(--io-muted); font-size: .83rem; }

.io-permission-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
.io-user-list, .io-permission-panel { background: #fff; border: 1px solid var(--io-border); border-radius: 18px; box-shadow: 0 10px 28px rgba(17,24,39,.06); }
.io-user-list { padding: 10px; align-self: start; position: sticky; top: 92px; }
.io-user-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; margin: 2px 0; border-radius: 10px; color: #374151; text-decoration: none !important; font-weight: 700; }
.io-user-list a:hover, .io-user-list a.active { background: #f4f5f7; color: var(--io-red); }
.io-permission-panel { padding: 20px; }
.io-permission-group { border: 1px solid var(--io-border); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.io-permission-group-head { padding: 12px 14px; background: #f8f9fb; border-bottom: 1px solid var(--io-border); font-weight: 850; }
.io-permission-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f0f1f3; }
.io-permission-row:last-child { border-bottom: 0; }
.io-permission-row small { color: var(--io-muted); display: block; margin-top: 2px; }
.io-switch { width: 20px; height: 20px; accent-color: var(--io-red); }
.io-route-pill { padding: 4px 7px; border-radius: 999px; background: #f3f4f6; color: #6b7280; font-size: .72rem; }

@media (max-width: 1100px) {
    .io-desktop-nav { display: none; }
    .io-user-menu { margin-left: auto; }
    .io-mobile-menu { display: block; margin-left: 0; }
    .io-stat-grid, .io-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .io-topbar-inner { min-height: 64px; padding: 0 14px; gap: 8px; }
    .io-brand-word { font-size: 1.05rem; }
    .io-user-menu { display: none; }
    .io-mobile-menu { margin-left: auto; }
    .io-page { padding: 20px 14px 42px; }
    .io-dashboard-hero { padding: 22px 20px; border-radius: 17px; }
    .io-dashboard-hero h1 { font-size: 1.55rem; }
    .io-stat-grid, .io-quick-grid { grid-template-columns: 1fr; }
    .io-permission-layout { grid-template-columns: 1fr; }
    .io-user-list { position: static; }
    .io-permission-row { grid-template-columns: 32px 1fr; }
    .io-route-pill { display: none; }
}
