/* Final 2.36: stabile UI-Basis, nur Klassen – keine aggressiven Wildcard-Übermalungen */

:root {
    --oe-red: #C41212;
    --oe-red-dark: #8f0f0f;
    --oe-ink: #111827;
    --oe-muted: #64748b;
    --oe-line: #d8dee8;
    --oe-soft: #f8fafc;
    --oe-card: rgba(255,255,255,.96);
    --oe-shadow: 0 18px 52px rgba(17,24,39,.10);
}

body {
    font-family: Calibri, Arial, sans-serif;
}

.oe-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    background:
        radial-gradient(circle at 10% 0%, rgba(196,18,18,.10), transparent 30%),
        linear-gradient(180deg, #f7f8fb 0%, #edf1f7 100%);
}

.oe-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 0% 0%, rgba(196,18,18,.38), transparent 34%),
        linear-gradient(180deg, #201018 0%, #0c1420 100%);
    box-shadow: 18px 0 60px rgba(17,24,39,.16);
}

.oe-sidebar-brand,
.oe-sidebar-nav a,
.oe-sidebar-footer a {
    color: #fff;
    text-decoration: none;
}

.oe-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 18px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.oe-sidebar-brand img {
    width: 46px;
    height: 46px;
}

.oe-sidebar-brand strong,
.oe-sidebar-brand small {
    display: block;
    line-height: 1.1;
}

.oe-sidebar-brand small {
    color: rgba(255,255,255,.72);
    font-weight: 800;
}

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

.oe-sidebar-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    border-radius: 15px;
    color: rgba(255,255,255,.82);
    font-weight: 900;
}

.oe-sidebar-nav a:hover {
    background: rgba(255,255,255,.11);
    color: #fff;
}

.oe-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
}

.oe-app-area {
    min-width: 0;
}

.oe-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(247,248,251,.84);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216,222,232,.76);
}

.oe-topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.oe-topbar-actions a,
.oe-topbar-actions button,
.btn,
.oe-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 16px;
    border: 1px solid rgba(209,213,219,.95);
    background: #fff;
    color: var(--oe-ink);
    text-decoration: none;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(17,24,39,.06);
}

.btn,
.oe-btn-primary,
button.btn,
input[type="submit"].btn {
    background: linear-gradient(135deg, var(--oe-red), var(--oe-red-dark));
    border-color: var(--oe-red);
    color: #fff;
    box-shadow: 0 14px 30px rgba(196,18,18,.22);
}

.btn:hover,
.oe-btn:hover,
.oe-topbar-actions a:hover,
.oe-topbar-actions button:hover {
    transform: translateY(-1px);
}

.oe-app-main {
    width: min(1580px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.card,
.oe-card,
.oe-internal-section,
.oe-system-card {
    border-radius: 30px;
    padding: clamp(26px, 3.2vw, 42px);
    background: var(--oe-card);
    border: 1px solid rgba(216,222,232,.92);
    box-shadow: var(--oe-shadow);
}

.card + .card,
.oe-card + .oe-card {
    margin-top: 22px;
}

.badge,
.oe-kicker,
.oe-internal-kicker,
.oe-system-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(196,18,18,.10);
    color: var(--oe-red);
    font-weight: 900;
}

.muted {
    color: var(--oe-muted);
}

.alert,
.oe-empty-state {
    border-radius: 18px;
    padding: 16px 18px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.box,
a.box {
    display: block;
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    color: var(--oe-ink);
    text-decoration: none;
    border: 1px solid rgba(216,222,232,.95);
    box-shadow: 0 12px 32px rgba(17,24,39,.06);
}

a.box:hover {
    transform: translateY(-2px);
    border-color: rgba(196,18,18,.34);
}

.box-label {
    color: var(--oe-muted);
    font-weight: 900;
    margin-bottom: 8px;
}

.box-value {
    color: var(--oe-ink);
    font-weight: 950;
    font-size: 30px;
    line-height: 1.05;
}

.input,
input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    color: var(--oe-ink);
    font: inherit;
}

textarea {
    min-height: 140px;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--oe-red);
    box-shadow: 0 0 0 4px rgba(196,18,18,.12);
}

.form h2 {
    margin-top: 34px;
}

.form .grid {
    align-items: stretch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 15px 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

tr:last-child td {
    border-bottom: 0 !important;
}

th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-weight: 950;
}

.oe-internal-hero,
.oe-system-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: clamp(28px, 4vw, 46px);
    color: #fff;
    background:
        radial-gradient(circle at 10% 0%, rgba(196,18,18,.24), transparent 28%),
        linear-gradient(135deg, #0b111c 0%, #18111a 56%, #7f1010 135%);
    box-shadow: 0 24px 70px rgba(17,24,39,.20);
}

.oe-internal-hero-content,
.oe-system-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
}

.oe-internal-hero h1,
.oe-system-hero h1 {
    margin: 18px 0 12px;
    color: #fff;
    font-size: clamp(38px, 4.5vw, 64px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.oe-internal-hero p,
.oe-system-hero p {
    color: rgba(255,255,255,.82);
}

.oe-internal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.oe-internal-btn {
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.20);
}

.oe-internal-btn.primary {
    background: var(--oe-red);
    border-color: var(--oe-red);
}

.oe-internal-btn.light {
    background: #fff;
    color: var(--oe-ink);
}

.oe-metric-grid,
.oe-system-stats,
.oe-php-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.oe-metric-card,
.oe-system-stat,
.oe-php-tile {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    border-radius: 24px;
    padding: 22px;
    background: #fff;
    color: var(--oe-ink);
    text-decoration: none;
    border: 1px solid rgba(216,222,232,.92);
    box-shadow: 0 14px 40px rgba(17,24,39,.07);
}

.oe-metric-card::after {
    content: "";
    position: absolute;
    right: -32px;
    bottom: -38px;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: rgba(196,18,18,.07);
}

.oe-metric-card span,
.oe-system-stat span,
.oe-php-tile span {
    color: var(--oe-muted);
    font-weight: 900;
}

.oe-metric-card strong,
.oe-system-stat strong,
.oe-php-tile strong {
    font-size: 34px;
    line-height: 1;
    color: var(--oe-ink);
}

.oe-metric-card small {
    color: var(--oe-muted);
    font-weight: 800;
}

.oe-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.oe-quick-card {
    min-height: 172px;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: 24px;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(216,222,232,.92);
    color: var(--oe-ink);
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(17,24,39,.06);
}

.oe-quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e30613, #8f0f0f);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 13px 28px rgba(196,18,18,.25);
}

.oe-internal-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.oe-list {
    display: grid;
    gap: 12px;
}

.oe-list-item {
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(216,222,232,.92);
}

.oe-list-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.oe-list-meta {
    color: var(--oe-muted);
}

.oe-pill,
.oe-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 900;
}

.oe-pill.red,
.oe-status-pill.fail {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.oe-pill.green,
.oe-status-pill.ok {
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #86efac;
}

.oe-pill.gray,
.oe-status-pill.warn {
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.oe-system-overall {
    min-width: 230px;
    border-radius: 24px;
    padding: 22px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
}

.oe-system-overall strong {
    color: #fff;
    display: block;
    font-size: 28px;
}

.oe-system-overall span {
    color: rgba(255,255,255,.75);
}

.oe-check-table-wrap {
    overflow-x: auto;
}

.oe-checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

.oe-checkbox-line input[type="checkbox"] {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

@media (max-width: 1200px) {
    .grid,
    .oe-metric-grid,
    .oe-system-stats,
    .oe-php-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .oe-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .oe-internal-columns {
        grid-template-columns: 1fr;
    }
}

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

    .oe-sidebar {
        display: none;
    }

    .oe-topbar {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .oe-app-main {
        padding: 18px 14px 28px;
    }

    .oe-internal-hero-content,
    .oe-system-hero-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .grid,
    .oe-metric-grid,
    .oe-system-stats,
    .oe-php-grid,
    .oe-quick-grid {
        grid-template-columns: 1fr;
    }
}

/* Final UI Humanize: Header sauber, keine doppelte Logo-/Top-Navigation */
.oe-mobile-brand {
    display: none !important;
}

.oe-mobile-nav {
    display: none !important;
}

.oe-topbar {
    justify-content: space-between !important;
}

.oe-topbar-title {
    display: grid;
    gap: 2px;
}

.oe-topbar-title strong {
    font-size: 18px;
    color: var(--oe-ink);
}

.oe-topbar-title span {
    color: var(--oe-muted);
    font-weight: 800;
    font-size: 13px;
}

.oe-topbar-actions {
    margin-left: auto;
}

/* Formularbereiche nicht mehr wie Datenbankmasken wirken lassen */
.oe-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
    gap: 14px;
    align-items: end;
    margin: 24px 0 22px;
    padding: 18px;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #d8dee8;
}

.oe-filter-form label {
    display: grid;
    gap: 7px;
    font-weight: 900;
}

.oe-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oe-clean-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.oe-person-card,
.oe-user-card,
.oe-customer-card {
    display: block;
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    color: var(--oe-ink);
    text-decoration: none;
    border: 1px solid #d8dee8;
    box-shadow: 0 12px 32px rgba(17,24,39,.06);
}

.oe-person-card:hover,
.oe-user-card:hover,
.oe-customer-card:hover {
    transform: translateY(-2px);
    border-color: rgba(196,18,18,.34);
}

.oe-card-title {
    font-size: 22px;
    font-weight: 950;
    margin: 6px 0 8px;
}

.oe-card-meta {
    color: var(--oe-muted);
    font-weight: 850;
    line-height: 1.55;
}

.oe-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}

.oe-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    font-size: 13px;
    font-weight: 900;
}

.oe-chip.red {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.oe-chip.green {
    color: #166534;
    background: #ecfdf3;
    border-color: #86efac;
}

.oe-chip.blue {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.oe-system-plain-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.oe-system-plain-head h1 {
    margin: 8px 0 8px;
    font-size: clamp(38px, 4vw, 58px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.oe-system-plain-status {
    min-width: 210px;
    border-radius: 24px;
    padding: 20px;
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #86efac;
    box-shadow: 0 12px 32px rgba(17,24,39,.06);
}

.oe-system-plain-status strong {
    display: block;
    font-size: 26px;
}

.oe-human-note {
    color: var(--oe-muted);
    line-height: 1.6;
}

@media (max-width: 980px) {
    .oe-mobile-nav {
        display: flex !important;
        gap: 8px;
        overflow-x: auto;
        width: 100%;
    }

    .oe-topbar {
        display: grid !important;
        justify-content: stretch !important;
    }

    .oe-topbar-actions {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .oe-filter-form {
        grid-template-columns: 1fr;
    }

    .oe-system-plain-head {
        display: grid;
    }

    .oe-system-plain-status {
        min-width: 0;
    }
}
