/**
 * IT-Dokumentation - Hauptstylesheet
 * Design: AdminLTE-inspiriert, professionelles IT-Admin-Interface
 */

/* ============================================================
   CSS Custom Properties
============================================================ */
:root {
    /* Primärfarben (AdminLTE-Stil) */
    --color-primary: #3c8dbc;
    --color-primary-dark: #367fa9;
    --color-primary-light: #5fa8d3;
    --color-secondary: #6c757d;
    --color-success: #00a65a;
    --color-warning: #f39c12;
    --color-danger: #dd4b39;
    --color-info: #00c0ef;

    /* Grau-Palette */
    --color-gray-50: #f8f9fa;
    --color-gray-100: #f1f3f5;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;

    /* Text */
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-text-light: #adb5bd;

    /* Hintergründe */
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f9;
    --color-bg-hover: #f8f9fa;

    /* Rahmen */
    --color-border: #dee2e6;
    --color-border-dark: #ced4da;

    /* Sidebar */
    --sidebar-bg: #343a40;
    --sidebar-text: #c2c7d0;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-header-bg: #2c3136;
    --sidebar-width: 250px;

    /* Navbar */
    --navbar-bg: #343a40;
    --navbar-height: 57px;

    /* Abstände */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Schrift */
    --font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 0.9375rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.125rem;
    --font-size-2xl: 1.375rem;
    --font-size-3xl: 1.75rem;

    /* Schatten */
    --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Radien */
    --radius-sm: 0.2rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;

    /* Übergänge */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;

    /* Layout */
    --header-height: var(--navbar-height);
    --max-content-width: 1200px;
}

/* ============================================================
   Reset & Basis
============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-alt);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--spacing-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-gray-900);
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p { margin: 0 0 var(--spacing-md); }

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; }

code, pre { font-family: var(--font-family-mono); font-size: var(--font-size-sm); }

code {
    padding: 0.1em 0.35em;
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

pre {
    padding: var(--spacing-md);
    background: var(--color-gray-800);
    color: #f8f9fa;
    border-radius: var(--radius);
    overflow-x: auto;
}
pre code { padding: 0; background: none; border: none; }

/* ============================================================
   AdminLTE Layout - Wrapper + Sidebar + Navbar
============================================================ */
.wrapper {
    display: block;
    min-height: 100vh;
    position: relative;
    background: var(--color-bg-alt);
}

/* ---- Navbar ---- */
.main-header.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    z-index: 1040;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav.ml-auto { margin-left: auto; }

.navbar-nav .nav-item { position: relative; }

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
    height: var(--navbar-height);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}
.navbar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    font-size: 1.1rem;
    padding: 0 1rem !important;
}

.burger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 18px;
}
.burger-icon span {
    display: block;
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
}

/* Brand in Navbar */
.navbar-brand-item { display: flex; align-items: center; }
.navbar-brand-link {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    gap: 0.75rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}
.navbar-brand-link:hover { color: #fff; text-decoration: none; }
.navbar-brand-img { height: 28px; width: auto; }
.navbar-brand-text { color: rgba(255,255,255,0.85); }

/* Navbar Search */
.navbar-search-form { display: flex; align-items: center; padding: 0 0.5rem; }
.navbar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.navbar-search-icon {
    position: absolute;
    left: 0.625rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
}
.navbar-search-input {
    width: 220px;
    padding: 0.35rem 0.75rem 0.35rem 2rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    font-size: var(--font-size-sm);
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}
.navbar-search-input::placeholder { color: rgba(255,255,255,0.45); }
.navbar-search-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    width: 260px;
}

/* Navbar Phonebook Quick-Search */
.navbar-phonebook-item { display: flex; align-items: center; padding: 0 0.5rem; }
.navbar-phonebook-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.navbar-phonebook-icon {
    position: absolute;
    left: 0.625rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
}
.navbar-phonebook-input {
    width: 200px;
    padding: 0.35rem 0.75rem 0.35rem 2rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    font-size: var(--font-size-sm);
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}
.navbar-phonebook-input::placeholder { color: rgba(255,255,255,0.45); }
.navbar-phonebook-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    width: 240px;
}

/* Navbar Favoriten-Schnellzugriff (gepinnte Services, nur Desktop) */
.navbar-fav-item { display: flex; align-items: center; padding: 0 0.25rem; }
.navbar-fav-wrap { display: flex; align-items: center; gap: 0.2rem; }
.navbar-fav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius, 6px);
    text-decoration: none;
    transition: background var(--transition-fast);
}
.navbar-fav-link:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.navbar-fav-icon { width: 20px; height: 20px; object-fit: contain; display: block; border-radius: 3px; }
.navbar-fav-letter {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #3c8dbc;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
/* Nur Desktop: ab Tablet (<= 992px) und Handy ausblenden */
@media (max-width: 992px) {
    .navbar-fav-item { display: none !important; }
}

/* User name display */
.user-name { color: rgba(255,255,255,0.85); font-size: var(--font-size-sm); }
.user-caret { font-size: 0.65rem; opacity: 0.7; }
.d-none { display: none !important; }
.d-md-inline { display: none; }
@media (min-width: 768px) { .d-md-inline { display: inline !important; } }
.d-sm-block { display: none !important; }
@media (min-width: 576px) { .d-sm-block { display: block !important; } }

/* ---- Sidebar ---- */
.main-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    z-index: 1035;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition), transform var(--transition);
    box-shadow: 2px 0 5px rgba(0,0,0,0.15);
}
.main-sidebar::-webkit-scrollbar { width: 4px; }
.main-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Brand Link */
.brand-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    background: rgba(0,0,0,0.1);
    min-height: var(--navbar-height);
    transition: background var(--transition-fast);
}
.brand-link:hover { background: rgba(0,0,0,0.15); text-decoration: none; color: #fff; }

.brand-image {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
}
.brand-icon-placeholder {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
}
.brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Scrollable Area */
.sidebar {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

/* Sidebar Navigation */
.nav-sidebar {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-sidebar .nav-header {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin-top: 0.75rem;
    pointer-events: none;
}

.nav-sidebar .nav-item { position: relative; }

.nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.9rem 0.6rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: background var(--transition-fast), color var(--transition-fast);
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
}
.nav-sidebar .nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: #fff;
    text-decoration: none;
}
.nav-sidebar .nav-link.active {
    background: var(--sidebar-active-bg);
    color: #fff;
    border-left-color: var(--color-primary);
    font-weight: 500;
}
.nav-sidebar .nav-link.active .nav-icon { color: var(--color-primary); }

.nav-sidebar .nav-icon {
    width: 1.375rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: rgba(255,255,255,0.6);
}
.nav-sidebar .nav-link:hover .nav-icon { color: rgba(255,255,255,0.9); }

.nav-sidebar .nav-link p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Sidebar collapsed (mini) */
body.sidebar-mini .main-sidebar { width: 4rem; }
body.sidebar-mini .nav-sidebar .nav-link p,
body.sidebar-mini .nav-sidebar .nav-header { display: none; }
body.sidebar-mini .content-wrapper { margin-left: 4rem; width: calc(100% - 4rem); }
body.sidebar-mini .main-sidebar:hover {
    width: var(--sidebar-width);
}
body.sidebar-mini .main-sidebar:hover .nav-sidebar .nav-link p,
body.sidebar-mini .main-sidebar:hover .nav-sidebar .nav-header { display: block; }

/* Sidebar Collapse Button (at bottom of sidebar, desktop only) */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--sidebar-border);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    transition: background var(--transition-fast), color var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}
.sidebar-collapse-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform var(--transition);
    display: inline-block;
}
.sidebar-collapse-text { font-size: 0.79rem; font-weight: 500; }
body.sidebar-collapsed .sidebar-collapse-icon { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-collapse-text { display: none; }
body.sidebar-mini .sidebar-collapse-text { display: none; }

/* Responsive display helpers */
.d-lg-none  { display: block; }
.d-lg-flex  { display: flex; }
@media (min-width: 993px) {
    .d-lg-none { display: none !important; }
}
@media (max-width: 992px) {
    .d-lg-flex { display: none !important; }
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1034;
}
.sidebar-overlay.active { display: block; }

/* ---- Content Wrapper ---- */
.content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
    padding-top: var(--navbar-height);
    min-height: 100vh;
    background: var(--color-bg-alt);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition), width var(--transition);
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl);
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
}
.main-content-fullwidth { max-width: none; padding: 0; }

/* ---- Footer ---- */
.main-footer {
    padding: 0.9rem var(--spacing-xl);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-sep {
    color: var(--color-border-dark);
    user-select: none;
}
.footer-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-link:hover { color: var(--color-primary); }

/* ============================================================
   License Modal (Open-Source-Lizenzen)
   ============================================================ */
.modal-dialog-lg { max-width: 880px; }

/* ---- Hero / Intro ---- */
.license-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg);
    padding: 1.25rem 1.5rem 1.35rem;
}
.license-hero-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
}
.license-hero-title i { color: #5fa8d3; }
.license-lead {
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0 0 0.85rem;
    color: #cbd5e1;
    max-width: 60ch;
}
.license-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.license-legend-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-right: 0.15rem;
}

/* ---- Sections ---- */
.license-section { margin-bottom: 1.75rem; }
.license-section:last-child { margin-bottom: 0.25rem; }
.license-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text);
    margin: 0 0 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--color-gray-200);
}
.license-section-title i { color: var(--color-primary); font-size: 0.85rem; }
.license-count {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--color-text-muted);
    background: var(--color-gray-100);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
}

/* ---- Card grid ---- */
.license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 0.75rem;
    align-items: start;
}
.license-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem 0.75rem;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.license-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.license-card--mit    { border-left-color: #28a745; }
.license-card--apache { border-left-color: #3c8dbc; }
.license-card--bsd    { border-left-color: #6c757d; }
.license-card--lgpl   { border-left-color: #f0ad4e; }
.license-card--ofl    { border-left-color: #d6457d; }
.license-card--gpl    { border-left-color: #a02622; }
.license-card--multi  { border-left-color: #8e7cc3; }

.license-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}
.license-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-right: auto;
}
.license-card-name a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.license-card-name a:hover { color: var(--color-primary); }
.license-card-name a .fa-arrow-up-right-from-square,
.license-card-name a .fa-external-link-alt {
    font-size: 0.62rem;
    opacity: 0.45;
}
.license-card-name a:hover .fa-external-link-alt { opacity: 0.9; }

/* ---- Badges ---- */
.license-badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}
.badge-mit    { background: #e3f6e9; color: #1b6e36; border-color: #b7e2c4; }
.badge-apache { background: #e1eefb; color: #1c5e91; border-color: #b6d6f1; }
.badge-lgpl   { background: #fdf1d6; color: #8a6116; border-color: #f3dca0; }
.badge-bsd    { background: #eceef0; color: #41484f; border-color: #d4d9de; }
.badge-ofl    { background: #fbe3ec; color: #a32a5c; border-color: #f3c2d5; }
.badge-ccby   { background: #e8f4f8; color: #1565c0; border-color: #b6dbef; }
.badge-gpl    { background: #fdecea; color: #a02622; border-color: #f5c2bd; }

/* ---- Meta tags (version, bundling) ---- */
.license-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.license-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.66rem;
    color: var(--color-text-muted);
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    padding: 0.08rem 0.4rem;
}
.license-tag i { font-size: 0.6rem; opacity: 0.7; }

.license-card-desc {
    font-size: 0.79rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}
.license-card-desc code {
    font-size: 0.72rem;
    background: var(--color-gray-100);
    border-radius: 3px;
    padding: 0.05rem 0.25rem;
}

/* ---- Collapsible full license text ---- */
details.license-text { margin-top: 0.5rem; }
details.license-text summary {
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-primary);
    user-select: none;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
details.license-text summary::-webkit-details-marker { display: none; }
details.license-text summary::before {
    content: "\f0da"; /* fa caret-right */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}
details.license-text[open] summary::before { transform: rotate(90deg); }
details.license-text summary:hover { text-decoration: underline; }
details.license-text pre {
    font-size: 0.7rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: var(--color-gray-50);
    border: 1px solid var(--color-border);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    margin: 0.45rem 0 0;
    line-height: 1.5;
    color: var(--color-gray-800);
}

/* ---- Footer note ---- */
.license-footer-note {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    background: var(--color-gray-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    margin: 1.5rem 0 0;
    line-height: 1.55;
}
.license-footer-note a { color: var(--color-primary); text-decoration: none; }
.license-footer-note a:hover { text-decoration: underline; }

/* Legacy fallback classes (kept for any non-redesigned usage) */
.license-note {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    background: var(--color-gray-50);
    border-left: 3px solid var(--color-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .license-grid { grid-template-columns: 1fr; }
}

/* ---- About Modal ---- */
.about-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
}
.about-app-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.about-app-name {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.2rem;
}
.about-app-version {
    font-size: 0.8rem;
    opacity: 0.85;
    background: rgba(255,255,255,0.15);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
}
.about-app-tagline {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    max-width: 340px;
    line-height: 1.4;
}
.about-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    flex: 1;
}
.about-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
}
.about-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--color-text);
    padding: 0.25rem 0;
}
.about-row-icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.about-row a {
    color: var(--color-primary);
    text-decoration: none;
}
.about-row a:hover { text-decoration: underline; }
.about-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}
.about-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    text-decoration: none;
}
.about-license-badge:hover { background: #ffe69c; }
.about-license-text {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0.375rem 0 0;
}
.about-footer-line {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-align: center;
    padding-top: 0.25rem;
}
.about-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    padding-top: 0.25rem;
}
.btn-report-bug {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-report-bug:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-bg-hover);
}

/* ---- Bug Report Modal ---- */
.bug-report-form { display: flex; flex-direction: column; gap: 0.875rem; }
.bug-report-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}
.bug-report-form label span {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}
.bug-report-form input,
.bug-report-form textarea,
.bug-report-form select {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition-fast);
}
.bug-report-form input:focus,
.bug-report-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.bug-report-form textarea { resize: vertical; min-height: 110px; }
.bug-report-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}
.bug-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

/* ============================================================
   User Menu Dropdown
============================================================ */
.user-menu { position: relative; }

.user-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.user-avatar-photo {
    object-fit: cover;
    background: none;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    min-width: 220px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1050;
}
.user-menu.open .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-gray-50);
}
.user-menu-header strong {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
}
.user-menu-header small {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.user-menu-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

.user-menu-dropdown .dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    text-decoration: none;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: inherit;
}
.user-menu-dropdown .dropdown-item:hover {
    background: var(--color-bg-hover);
    text-decoration: none;
}

.logout-form { margin: 0; }
.logout-btn { color: var(--color-danger) !important; }

/* ============================================================
   Breadcrumbs
============================================================ */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0 0 var(--spacing-lg);
}
.breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.breadcrumb ol li { display: flex; align-items: center; gap: 0.25rem; }
.breadcrumb ol li::before { content: '/'; color: var(--color-gray-400); }
.breadcrumb ol li:first-child::before { display: none; }
.breadcrumb ol li a { color: var(--color-text-muted); }
.breadcrumb ol li a:hover { color: var(--color-primary); }
.breadcrumb ol li[aria-current="page"] { color: var(--color-text); font-weight: 500; }

/* ============================================================
   Buttons
============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    vertical-align: middle;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary-dark);
}
.btn-primary:hover { background: var(--color-primary-dark); border-color: #2e6d9e; color: white; }

.btn-secondary {
    background: var(--color-gray-600);
    color: white;
    border-color: #5a6268;
}
.btn-secondary:hover { background: #5a6268; border-color: #545b62; color: white; }

.btn-outline-secondary {
    background: transparent;
    color: var(--color-gray-700);
    border-color: var(--color-border);
}
.btn-outline-secondary:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
    border-color: var(--color-border-dark);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border-color: #c0392b;
}
.btn-danger:hover { background: #c0392b; border-color: #a93226; color: white; }

.btn-warning {
    background: var(--color-warning);
    color: white;
    border-color: #e67e22;
}
.btn-warning:hover { background: #e67e22; color: white; }

.btn-success {
    background: var(--color-success);
    color: white;
    border-color: #009150;
}
.btn-success:hover { background: #009150; color: white; }

.btn-info {
    background: var(--color-info);
    color: white;
    border-color: #00a9d1;
}
.btn-info:hover { background: #00a9d1; color: white; }

.btn-link {
    background: none;
    color: var(--color-primary);
    border-color: transparent;
    padding: 0.4375rem 0.5rem;
}
.btn-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

.btn-ghost {
    background: none;
    color: var(--color-text-muted);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--color-bg-hover); color: var(--color-text); }

/* AdminLTE btn-default (alias for btn-secondary outline style) */
.btn-default {
    background: #fff;
    color: #333;
    border-color: #ccc;
}
.btn-default:hover { background: #f4f4f4; border-color: #b5b5b5; color: #333; }

/* btn-outline-primary */
.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline-primary:hover { background: var(--color-primary); color: #fff; }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 0.5625rem 1.125rem;
    font-size: var(--font-size-base);
}
.btn-icon {
    padding: 0.375rem 0.5rem;
    min-width: 2rem;
}
.btn-block { width: 100%; }

/* ============================================================
   Formulare
============================================================ */
.form-group { margin-bottom: 1.125rem; }

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-gray-700);
}
.form-group label.required::after {
    content: ' *';
    color: var(--color-danger);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    font-size: var(--font-size-sm);
    font-family: inherit;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 2.375rem;
}
.form-control:hover:not(:disabled) { border-color: var(--color-border-dark); }
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}
.form-control:disabled {
    background: var(--color-gray-100);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 2rem;
    cursor: pointer;
}

.form-hint {
    margin-top: 0.25rem;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: var(--font-size-xs);
    color: var(--color-danger);
}

/* Alerts / Hinweisboxen */
.alert {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}
.alert > i,
.alert > .fas,
.alert > .far {
    margin-right: 0.4rem;
}
.alert-success {
    color: #1b6b3a;
    background: #eafaf1;
    border-color: #abe7c4;
}
.alert-warning {
    color: #8a5a00;
    background: #fff7e6;
    border-color: #fbe2b2;
}
.alert-danger {
    color: #a02d20;
    background: #fdecea;
    border-color: #f5c2bb;
}
.alert-info {
    color: #0b6b7a;
    background: #e7f8fb;
    border-color: #b5e7f0;
}
.alert-link {
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
    font-size: var(--font-size-sm);
}

.form-group input[type="checkbox"],
.capability-checkbox input[type="checkbox"],
.settings-toggle input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--color-border-dark);
    border-radius: 0.2rem;
    background: var(--color-bg);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    vertical-align: middle;
}
.form-group input[type="checkbox"]:hover,
.capability-checkbox input[type="checkbox"]:hover,
.settings-toggle input[type="checkbox"]:hover,
.checkbox-label input[type="checkbox"]:hover { border-color: var(--color-primary); }

.form-group input[type="checkbox"]:checked,
.capability-checkbox input[type="checkbox"]:checked,
.settings-toggle input[type="checkbox"]:checked,
.checkbox-label input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.form-group input[type="checkbox"]:checked::after,
.capability-checkbox input[type="checkbox"]:checked::after,
.settings-toggle input[type="checkbox"]:checked::after,
.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.form-group input[type="checkbox"]:indeterminate,
.capability-checkbox input[type="checkbox"]:indeterminate {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.form-group input[type="checkbox"]:indeterminate::after,
.capability-checkbox input[type="checkbox"]:indeterminate::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 2px;
    background: #fff;
    border: none;
    transform: none;
}
.form-group input[type="checkbox"]:focus,
.capability-checkbox input[type="checkbox"]:focus,
.settings-toggle input[type="checkbox"]:focus,
.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.2);
}

/* ============================================================
   Tabellen
============================================================ */
.table-wrapper {
    overflow-x: auto;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    margin: 0;
}
.data-table th,
.data-table td {
    padding: 0.625rem 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.data-table th {
    background: var(--color-gray-50);
    font-weight: 600;
    color: var(--color-gray-700);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border-bottom: 2px solid var(--color-border);
}
.data-table tbody tr:hover { background: #f5f5f5; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .actions-col { width: 1%; white-space: nowrap; }
.data-table-compact th,
.data-table-compact td { padding: 0.375rem 0.625rem; }
.inactive-row { opacity: 0.55; }
.text-right { text-align: right; }
/* Rechtsbündige Spalten (z. B. Beträge) auch innerhalb von .data-table */
.data-table th.text-right,
.data-table td.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ============================================================
   Wiederverwendbare UI-Komponenten (Styleguide)
   Kanonische Klassen für alle Module – NICHT pro Modul unter
   eigenem Präfix neu definieren (siehe STYLEGUIDE.md).
============================================================ */

/* Seiten-Body unterhalb des Content-Headers */
.page-body { padding: 1.25rem 1rem 3rem; background: var(--color-gray-50, #f9fafb); flex: 1; }
@media (max-width: 768px) { .page-body { padding: 1rem 0.75rem 2rem; } }

/* Klickbare Tabellenzeilen (data-href via JS) */
.data-table tbody tr.clickable { cursor: pointer; }

/* Tabelle scrollt auf kleinen Screens horizontal statt zu quetschen.
   Schmale Tabellen können mit .data-table--fluid aussteigen. */
@media (max-width: 768px) { .table-wrapper .data-table { min-width: 640px; } }
.table-wrapper .data-table--fluid { min-width: 0 !important; }

/* Empty-State innerhalb eines Tabellen-Wrappers: kein Doppelrahmen */
.table-wrapper .empty-state { border: none; background: transparent; }

/* KPI-Zeile: kompakte small-boxes, beliebig viele nebeneinander.
   Boxen einer Zeile sind immer gleich hoch (flex-stretch) – leere
   Footer als Höhen-Füller sind nicht nötig. */
.kpi-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 0.75rem; }
.kpi-col { flex: 1 1 160px; display: flex; }
.kpi-col > a { flex: 1; display: flex; text-decoration: none; }
.kpi-row .small-box { flex: 1; margin-bottom: 0; display: flex; flex-direction: column; }
.kpi-row .small-box > .inner { padding: 7px 10px; flex: 1; }
.kpi-row .small-box h3 { font-size: 1.6rem; margin-bottom: 4px; }
.kpi-row .small-box p { font-size: 0.85rem; }
.kpi-row .small-box > .small-box-footer { margin-top: auto; }

/* Status-Pills (semantische Varianten; Farben als Variablen für Theming) */
:root {
    --pill-success-bg: #d1fae5; --pill-success-fg: #065f46;
    --pill-info-bg:    #dbeafe; --pill-info-fg:    #1e40af;
    --pill-warning-bg: #fef3c7; --pill-warning-fg: #92400e;
    --pill-caution-bg: #fefce8; --pill-caution-fg: #ca8a04;
    --pill-orange-bg:  #ffedd5; --pill-orange-fg:  #c2410c;
    --pill-danger-bg:  #fee2e2; --pill-danger-fg:  #b91c1c;
    --pill-neutral-bg: #f3f4f6; --pill-neutral-fg: #6b7280;
    --pill-purple-bg:  #ede9fe; --pill-purple-fg:  #5b21b6;
}
.status-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.6rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.status-pill--success { background: var(--pill-success-bg); color: var(--pill-success-fg); }
.status-pill--info    { background: var(--pill-info-bg);    color: var(--pill-info-fg); }
.status-pill--warning { background: var(--pill-warning-bg); color: var(--pill-warning-fg); }
.status-pill--caution { background: var(--pill-caution-bg); color: var(--pill-caution-fg); }
.status-pill--orange  { background: var(--pill-orange-bg);  color: var(--pill-orange-fg); }
.status-pill--danger  { background: var(--pill-danger-bg);  color: var(--pill-danger-fg); }
.status-pill--neutral { background: var(--pill-neutral-bg); color: var(--pill-neutral-fg); }
.status-pill--purple  { background: var(--pill-purple-bg);  color: var(--pill-purple-fg); }
.pill-row { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; }

/* Links in Tabellenzellen (statt Inline-Farben) */
.table-link { color: var(--color-primary, #3c8dbc); font-weight: 600; text-decoration: none; }
.table-link:hover { color: var(--color-primary-dark, #367fa9); text-decoration: none; }

/* Einheitliche Button-Größe im Seitenkopf – egal ob btn oder btn-sm gesetzt ist */
.content-header-actions .btn {
    padding: 0.45rem 0.875rem;
    font-size: 0.85rem;
    display: inline-flex; align-items: center; gap: 0.4rem;
}

/* Sub-Navigation (Tab-Leiste innerhalb einer Seite, z. B. VMs/Hosts/Cluster) */
.subnav { display: flex; gap: 0.375rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.subnav-tab {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 1.1rem; border-radius: 0.3rem; font-size: 0.85rem; font-weight: 600;
    background: #fff; border: 1px solid var(--color-border, #e5e7eb);
    color: var(--color-gray-600, #495057); text-decoration: none; white-space: nowrap;
}
.subnav-tab:hover { background: #f3f4f6; color: #212529; text-decoration: none; }
.subnav-tab.active { background: var(--color-primary, #3c8dbc); color: #fff; border-color: var(--color-primary, #3c8dbc); }

/* Standard-Modal (Overlay + Karte; Sichtbarkeit via Inline-Style oder .open) */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 2rem;
}
.modal-card {
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    position: relative;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.modal-header h2 { font-size: 1.1rem; font-weight: 600; margin: 0; color: #111827; }
.modal-close {
    background: none; border: none; font-size: 1.5rem; color: #9ca3af;
    cursor: pointer; width: 32px; height: 32px; display: flex;
    align-items: center; justify-content: center; border-radius: 0.25rem;
}
.modal-close:hover { background: #f3f4f6; color: #374151; }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* Status-Dot (Ampelpunkt, optional pulsierend) */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-gray-300, #d1d5db); }
.status-dot--success { background: #10b981; }
.status-dot--warning { background: #f59e0b; }
.status-dot--danger  { background: #ef4444; }
.status-dot--pulse   { animation: status-dot-pulse 1.5s infinite; }
@keyframes status-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* Detail-Karte (Haupt- und Sidebar-Karten auf Detailseiten) */
.detail-card {
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.25rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.detail-card:last-child { margin-bottom: 0; }
.detail-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between;
}
.detail-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
}
.detail-card-body { padding: 1.25rem; }
@media (max-width: 480px) {
    .detail-card-header { padding: 0.75rem 1rem; }
    .detail-card-body { padding: 0.875rem; }
}

/* ============================================================
   Badges
============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.6em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 10rem;
    line-height: 1;
    white-space: nowrap;
}

.badge-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.badge-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.badge-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.badge-admin   { background: var(--color-primary); color: white; border: 1px solid var(--color-primary-dark); }
.badge-role    { background: var(--color-gray-200); color: var(--color-gray-700); border: 1px solid var(--color-gray-300); }
.badge-secondary { background: var(--color-gray-200); color: var(--color-gray-600); border: 1px solid var(--color-gray-300); }

/* Severity */
.severity-badge {
    padding: 0.2em 0.6em;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}
.severity-critical { background: #f8d7da; color: #721c24; }
.severity-high     { background: #fde8d0; color: #7b3a10; }
.severity-medium   { background: #fff3cd; color: #856404; }
.severity-low      { background: #d1ecf1; color: #0c5460; }

/* Action Badges */
.action-badge {
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}
.category-auth       { background: #d1ecf1; color: #0c5460; }
.category-content    { background: #d4edda; color: #155724; }
.category-admin      { background: #e2d9f3; color: #4a235a; }
.category-system     { background: var(--color-gray-200); color: var(--color-gray-700); }
.category-permission { background: #fde8d0; color: #7b3a10; }
.category-security   { background: #f8d7da; color: #721c24; }
.category-file       { background: #fff3cd; color: #856404; }
.category-files      { background: #fff3cd; color: #856404; }
.category-export     { background: #cce5ff; color: #004085; }
.category-contact    { background: #d6f5e3; color: #1a5c35; }
.category-order      { background: #fce4d6; color: #8b3a00; }
.category-service    { background: #dce8fb; color: #1a3a6b; }
.category-asset      { background: #e8f4fd; color: #1a5276; }
.category-assets     { background: #e8f4fd; color: #1a5276; }
.category-tickets    { background: #fef9e7; color: #7d6608; }
.category-vault      { background: #f4ecf7; color: #6c3483; }
.category-ipam       { background: #e8f8f5; color: #1e8449; }
.category-ssl        { background: #fdedec; color: #922b21; }
.category-kanban     { background: #fef5e7; color: #9a7d0a; }
.category-ai_chat    { background: #eaf2ff; color: #154360; }
.category-contract   { background: #f5eef8; color: #6c3483; }
.category-loan       { background: #fdfefe; color: #566573; }
.category-stock      { background: #eafaf1; color: #1e8449; }
.category-monitoring { background: #fef9e7; color: #7d6608; }
.category-cve        { background: #fdedec; color: #922b21; }

/* ============================================================
   Flash Messages / Alerts
============================================================ */
.flash-messages { margin-bottom: var(--spacing-lg); }

.flash-message {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.flash-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.flash-warning { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.flash-info    { background: #d1ecf1; color: #0c5460; border-color: #bee5eb; }

/* ============================================================
   Cards
============================================================ */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.125rem;
    background: var(--color-gray-50);
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius) var(--radius) 0 0;
}
.card-title {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-gray-800);
}

.card > .card-header + * { border-radius: 0 0 var(--radius) var(--radius); }
.card > :not(.card-header):first-child { border-radius: var(--radius) var(--radius) 0 0; }

/* Card padding helper */
.card-body { padding: var(--spacing-lg); }
.card-body .card-header { margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg); }

/* When card has just padding */
.card:not(:has(.card-header)) { padding: var(--spacing-lg); }
.card:has(.card-header) > *:not(.card-header) { padding: var(--spacing-lg); }

/* AdminLTE card-outline variants */
.card-outline { box-shadow: none; }
.card-outline.card-primary { border-top: 3px solid var(--color-primary); }
.card-outline.card-success  { border-top: 3px solid var(--color-success); }
.card-outline.card-warning  { border-top: 3px solid var(--color-warning); }
.card-outline.card-danger   { border-top: 3px solid var(--color-danger); }

/* Colored card headers */
.card-header.bg-primary { background: var(--color-primary); color: white; border-color: var(--color-primary-dark); }
.card-header.bg-success { background: var(--color-success); color: white; border-color: #009150; }
.card-header.bg-warning { background: var(--color-warning); color: white; border-color: #e67e22; }
.card-header.bg-danger  { background: var(--color-danger);  color: white; border-color: #c0392b; }
.card-header.bg-info    { background: var(--color-info);    color: white; border-color: #00a9d1; }

/* ============================================================
   Empty State
============================================================ */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.empty-icon { font-size: 3.5rem; margin-bottom: var(--spacing-md); opacity: 0.45; }
.empty-state h2 { margin-bottom: var(--spacing-sm); color: var(--color-gray-700); }
.empty-state p { color: var(--color-text-muted); margin-bottom: var(--spacing-lg); }

/* ============================================================
   Pagination
============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}
.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    background: var(--color-bg);
    transition: all var(--transition-fast);
}
.pagination-link:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    text-decoration: none;
}
.pagination-link.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 600;
}
.pagination-link.disabled { opacity: 0.5; pointer-events: none; color: var(--color-text-muted); }

/* ============================================================
   Modals
============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal[hidden] { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.modal-dialog {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-gray-50);
}
.modal-header h3 { margin: 0; font-size: var(--font-size-lg); }
.modal-close {
    background: none;
    border: none;
    font-size: 1.375rem;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--color-text); }
.modal-body { padding: var(--spacing-lg); overflow-y: auto; }

/* ============================================================
   Dropdown
============================================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: none;
    padding: 0.25rem 0;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
    display: block;
    padding: 0.4375rem 1rem;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    transition: background var(--transition-fast);
}
.dropdown-item:hover { background: var(--color-bg-hover); text-decoration: none; }
.dropdown-divider {
    margin: 0.25rem 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

/* ============================================================
   Notification Bell
============================================================ */
.notif-bell { position: relative; }
.notif-bell-btn {
    position: relative;
}
.notif-bell-icon { font-size: 1.1rem; }
.notif-badge {
    position: absolute;
    top: 10px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--color-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    border: 2px solid var(--navbar-bg);
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    width: 360px;
    max-height: 460px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-gray-50);
}
.notif-dropdown-header strong { font-size: 0.875rem; }
.notif-header-actions { display: flex; gap: 0.25rem; }
.notif-mark-all, .notif-delete-read {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.2rem 0.375rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    white-space: nowrap;
}
.notif-mark-all:hover { background: #e8f4fd; }
.notif-delete-read { color: var(--color-danger); }
.notif-delete-read:hover { background: #fdf3f2; }
.notif-push-toggle { background: none; border: none; color: #6c757d; font-size: 0.7rem; cursor: pointer; padding: 0.2rem 0.375rem; border-radius: var(--radius-sm); transition: background var(--transition-fast), color var(--transition-fast); white-space: nowrap; }
.notif-push-toggle:hover { background: #f0f0f0; }
.notif-push-toggle.push-active { color: var(--color-primary); }
.notif-dropdown-body { max-height: 380px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.notif-item:hover { background: #f8f9fa; }
.notif-item.unread { background: #eff8ff; }
.notif-item.unread:hover { background: #ddf1ff; }
.notif-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.notif-item-icon.type-page_changed { background: #d1ecf1; color: #0c5460; }
.notif-item-icon.type-review_due   { background: #fff3cd; color: #856404; }
.notif-item-icon.type-info         { background: #e2d9f3; color: #4a235a; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-message {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-time { font-size: 0.65rem; color: var(--color-gray-400); margin-top: 0.2rem; }
.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}
.notif-delete-btn {
    background: none;
    border: none;
    color: var(--color-gray-400);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.2rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}
.notif-item:hover .notif-delete-btn { opacity: 1; }
.notif-delete-btn:hover { color: var(--color-danger); background: #fdf3f2; }

/* ============================================================
   Utilities
============================================================ */
.text-muted   { color: var(--color-text-muted) !important; }
.text-danger  { color: var(--color-danger) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-info    { color: var(--color-info) !important; }
.text-primary { color: var(--color-primary) !important; }

.inline-form { display: inline; }

.action-buttons {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}
.result-count {
    margin-top: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
}
.hash {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-xs);
    word-break: break-all;
}

/* ============================================================
   Toast Notifications
============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 0.75rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
    border-left: 4px solid var(--color-gray-400);
    pointer-events: auto;
    animation: toastSlideIn 0.25s ease-out;
    transition: all 0.25s ease;
}
.toast.toast-hiding { animation: toastSlideOut 0.25s ease-in forwards; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}
.toast-success { border-left-color: var(--color-success); }
.toast-success .toast-icon { background: var(--color-success); color: #fff; }
.toast-error   { border-left-color: var(--color-danger); }
.toast-error .toast-icon   { background: var(--color-danger); color: #fff; }
.toast-warning { border-left-color: var(--color-warning); }
.toast-warning .toast-icon { background: var(--color-warning); color: #fff; }
.toast-info    { border-left-color: var(--color-info); }
.toast-info .toast-icon    { background: var(--color-info); color: #fff; }
.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}
.toast-content { flex: 1; min-width: 0; }
.toast-message { font-size: var(--font-size-sm); font-weight: 500; color: var(--color-gray-900); line-height: 1.4; }
.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    color: var(--color-gray-400);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.toast-close:hover { background: rgba(0,0,0,0.05); color: var(--color-text); }

/* ============================================================
   Hero Header System
============================================================ */
.hero {
    color: #fff;
    padding: 1.75rem 2rem;
}
.hero--blue    { background: linear-gradient(135deg, #1a56a0 0%, #3c8dbc 100%); }
.hero--indigo  { background: linear-gradient(135deg, #312e81 0%, #6366f1 100%); }
.hero--emerald { background: linear-gradient(135deg, #065f46 0%, #059669 100%); }
.hero--amber   { background: linear-gradient(135deg, #78350f 0%, #d97706 100%); }
.hero--purple  { background: linear-gradient(135deg, #581c87 0%, #9333ea 100%); }
.hero--slate   { background: linear-gradient(135deg, #1e3a5f 0%, #3c8dbc 100%); }
.hero--teal    { background: linear-gradient(135deg, #134e4a 0%, #0d9488 100%); }
.hero--dark    { background: linear-gradient(135deg, #1a1d23 0%, #343a40 100%); }

.hero--compact { padding: 1.25rem 2rem 1.5rem; }
.hero--no-bottom-pad { padding-bottom: 0; }

.hero__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
}
.hero__text h1 {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.2rem;
    color: #fff;
    line-height: 1.2;
}
.hero__desc { font-size: 0.875rem; margin: 0; color: rgba(255,255,255,0.72); }
.hero__meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255,255,255,0.18);
    padding: 0.175rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.775rem;
    font-weight: 500;
}
.hero__meta-item {
    font-size: 0.82rem;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.hero__back {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--transition-fast);
    margin-bottom: 0.625rem;
}
.hero__back:hover { color: #fff; text-decoration: none; }

.hero__actions {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Hero Buttons */
.hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.825rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    line-height: 1.5;
}
.hero__btn:hover { opacity: 0.88; text-decoration: none; }
.hero__btn--primary {
    background: #fff;
    color: #1a56a0;
    border-color: rgba(255,255,255,0.9);
}
.hero__btn--outline {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}
.hero__btn--outline:hover { background: rgba(255,255,255,0.28); opacity: 1; }
.hero__btn--danger {
    background: rgba(221,75,57,0.2);
    color: #fff;
    border-color: rgba(221,75,57,0.4);
}
.hero__btn--danger:hover { background: rgba(221,75,57,0.35); opacity: 1; }

.hero__left { display: flex; align-items: center; gap: 1rem; }

/* Hero Breadcrumb */
.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    opacity: 0.88;
    flex-wrap: wrap;
}
.hero-breadcrumb a { color: rgba(255,255,255,0.78); text-decoration: none; }
.hero-breadcrumb a:hover { color: #fff; }
.hero-breadcrumb span { color: rgba(255,255,255,0.45); }
.hero-breadcrumb .current { color: #fff; font-weight: 500; }

/* Hero Search */
.hero__search { margin-top: 0.875rem; margin-bottom: 0.4rem; }
.hero__search form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 520px;
}
.hero__search-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.hero__search-icon {
    position: absolute;
    left: 0.7rem;
    pointer-events: none;
    color: rgba(255,255,255,0.55);
}
.hero__search input[type="search"],
.hero__search input[type="text"] {
    width: 100%;
    padding: 0.45rem 0.875rem 0.45rem 2.125rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition-fast);
}
.hero__search input::placeholder { color: rgba(255,255,255,0.5); }
.hero__search input:focus {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.55);
}
.hero__search-btn {
    padding: 0.45rem 0.875rem;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}
.hero__search-btn:hover { background: rgba(255,255,255,0.28); }
.hero__search-reset {
    color: rgba(255,255,255,0.65);
    font-size: 0.775rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
}
.hero__search-reset:hover { color: #fff; text-decoration: none; }

/* Hero Filter Bar */
.hero__filterbar {
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 0.875rem;
}
.hero__filterbar form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hero__filterbar input[type="search"],
.hero__filterbar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 0.4rem 0.875rem 0.4rem 2.125rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition-fast);
}
.hero__filterbar input::placeholder { color: rgba(255,255,255,0.5); }
.hero__filterbar input:focus { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.55); }
.hero__filterbar select {
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    appearance: none;
}
.hero__filterbar select option { background: #343a40; color: #fff; }
.hero__filterbar select:focus { background: rgba(255,255,255,0.22); }
.hero__filterbar-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.hero__filterbar-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255,255,255,0.55);
}
.hero__filterbar-btn {
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}
.hero__filterbar-btn:hover { background: rgba(255,255,255,0.28); }
.hero__filterbar-reset {
    color: rgba(255,255,255,0.65);
    font-size: 0.775rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
}
.hero__filterbar-reset:hover { color: #fff; text-decoration: none; }

/* Hero KPI Bar */
.hero__kpi-bar {
    display: flex;
    align-items: stretch;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 1rem;
}
.hero__kpi-item {
    flex: 1;
    padding: 0.625rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.hero__kpi-divider {
    width: 1px;
    background: rgba(255,255,255,0.18);
    align-self: stretch;
    margin: 0.4rem 0;
}
.hero__kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.hero__kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

/* ============================================================
   Dashboard
============================================================ */
.dashboard { max-width: var(--max-content-width); margin: 0 auto; }
.dashboard-header { margin-bottom: var(--spacing-xl); }
.dashboard-header h1 { margin-bottom: var(--spacing-xs); }
.dashboard-subtitle { color: var(--color-text-muted); margin: 0; }
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}
.dashboard-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}
.dashboard-card h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}
.quick-actions { display: flex; flex-wrap: wrap; gap: var(--spacing-sm); }
.quick-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.4375rem 0.875rem;
    background: var(--color-gray-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}
.quick-action:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary-dark);
    text-decoration: none;
}
.quick-icon { font-size: 1.125em; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-sm); }
.stat-item {
    text-align: center;
    padding: 0.875rem;
    background: var(--color-gray-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-item { padding: 0.4375rem 0; border-bottom: 1px solid var(--color-border); }
.recent-item:last-child { border-bottom: none; }
.recent-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}
.recent-item a:hover { color: var(--color-primary); text-decoration: none; }
.recent-date { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* ============================================================
   Searchable Select Component
============================================================ */
.ss-wrap { position: relative; display: block; width: 100%; }
.tk-filters .ss-wrap, .tc-actions .ss-wrap { width: auto; min-width: 150px; }

.ss-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    line-height: 1.5;
    min-height: 2.375rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ss-trigger::after { content: '▾'; font-size: 0.8em; color: var(--color-text-muted); margin-left: 0.4rem; flex-shrink: 0; }
.ss-trigger-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-trigger.ss-placeholder .ss-trigger-label { color: var(--color-text-muted); }
.ss-trigger:hover, .ss-trigger:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.15);
    outline: none;
}
.ss-dropdown {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    min-width: 180px;
}
.ss-dropdown.open { display: flex; }
.ss-search-wrap { padding: 0.4rem; border-bottom: 1px solid var(--color-border); }
.ss-search {
    width: 100%;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.ss-search:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(60, 141, 188, 0.15); }
.ss-list { max-height: 240px; overflow-y: auto; padding: 0.2rem 0; }
.ss-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}
.ss-item:hover { background: var(--color-bg-hover); }
/* Tastatur-Highlight (Pfeiltasten). Deutlicher als Hover, damit Maus + Tastatur
   gleichzeitig nutzbar sind ohne Unsicherheit, was "aktiv" ist. */
.ss-item.ss-active { background: rgba(60, 141, 188, 0.14); box-shadow: inset 2px 0 0 var(--color-primary); }
.ss-item.ss-selected { color: var(--color-primary); font-weight: 500; background: rgba(60, 141, 188, 0.07); }
.ss-item.ss-empty-opt { color: var(--color-text-muted); font-style: italic; }
.ss-item[data-depth="1"] { padding-left: 1.75rem; }
.ss-item[data-depth="2"] { padding-left: 3rem; }
.ss-item[data-depth="3"] { padding-left: 4.25rem; }
.ss-indent { color: var(--color-text-muted); font-size: 0.82em; flex-shrink: 0; }
.ss-no-results { padding: 0.75rem 0.875rem; font-size: var(--font-size-sm); color: var(--color-text-muted); text-align: center; }

/* ============================================================
   AdminLTE Content-Header
   Simple page title bar with breadcrumbs
============================================================ */
.content-header {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}
.content-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}
.content-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
}
.content-header .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin-right: 0.3rem;
    color: #adb5bd;
}
.content-header .breadcrumb-item.active { color: #6c757d; }
.content-header .breadcrumb-item a { color: var(--color-primary); text-decoration: none; }
.content-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Standard inner content padding after content-header */
.page-body {
    padding: 20px;
}

/* ============================================================
   AdminLTE Small-Box (KPI stat cards)
============================================================ */
.small-box {
    border-radius: 0.25rem;
    position: relative;
    display: block;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    overflow: hidden;
}
.small-box > .inner {
    padding: 10px;
}
.small-box h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    white-space: nowrap;
    padding: 0;
    color: #fff;
}
.small-box p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}
.small-box .icon {
    position: absolute;
    top: -10px;
    right: 10px;
    z-index: 0;
    font-size: 70px;
    color: rgba(0,0,0,.15);
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}
.small-box .icon svg {
    width: 70px;
    height: 70px;
}
.small-box > .small-box-footer {
    position: relative;
    text-align: center;
    padding: 3px 0;
    color: rgba(255,255,255,.8);
    display: block;
    z-index: 10;
    background: rgba(0,0,0,.1);
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.15s;
}
.small-box > .small-box-footer:hover {
    color: #fff;
    background: rgba(0,0,0,.15);
}
.small-box.bg-info    { background-color: #17a2b8 !important; }
.small-box.bg-success { background-color: #28a745 !important; }
.small-box.bg-warning { background-color: #ffc107 !important; color: #333; }
.small-box.bg-warning h3, .small-box.bg-warning p { color: #333; }
.small-box.bg-warning .small-box-footer { color: rgba(0,0,0,.6); }
.small-box.bg-danger  { background-color: #dc3545 !important; }
.small-box.bg-primary { background-color: #007bff !important; }
.small-box.bg-secondary { background-color: #6c757d !important; }
.small-box.bg-teal    { background-color: #20c997 !important; }
.small-box.bg-indigo  { background-color: #6610f2 !important; }
.small-box.bg-purple  { background-color: #6f42c1 !important; }
.small-box.bg-orange  { background-color: #fd7e14 !important; }
.small-box.bg-lime    { background-color: #84cc16 !important; color: #333; }
.small-box.bg-lime h3, .small-box.bg-lime p { color: #333; }

@media (max-width: 767.98px) {
    .small-box h3 { font-size: 1.6rem; }
    .small-box .icon { font-size: 50px; }
}

/* ============================================================
   AdminLTE Info-Box (alternative KPI style)
============================================================ */
.info-box {
    cursor: default;
    display: flex;
    min-height: 80px;
    background: #fff;
    border-radius: 0.25rem;
    margin-bottom: 20px;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    overflow: hidden;
}
.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    font-size: 1.875rem;
    flex-shrink: 0;
    color: #fff;
}
.info-box-icon svg { width: 32px; height: 32px; }
.info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 10px;
    flex: 1;
    min-width: 0;
}
.info-box-text {
    display: block;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #6c757d;
}
.info-box-number {
    display: block;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
}

/* ============================================================
   Module filter card (replaces hero__filterbar)
============================================================ */
.filter-card {
    background: #fff;
    border-radius: 0.25rem;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.1);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}
.filter-card-body {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.1rem 1rem;
}
.filter-card .form-control,
.filter-card select {
    display: inline-block;
    width: auto;
}
.filter-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}
.filter-input-wrap .filter-search-icon {
    position: absolute;
    left: 0.6rem;
    color: #adb5bd;
    pointer-events: none;
}
.filter-input-wrap input[type="search"],
.filter-input-wrap input[type="text"] {
    padding-left: 2rem;
    width: 100%;
}

/* ============================================================
   Old Layout Classes (Backwards Compatibility)
   These were used in the previous top-nav layout.
   Kept for any inline usage in module templates.
============================================================ */
.app-layout { display: flex; min-height: 100vh; }
.app-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: var(--sidebar-bg); color: #c2c7d0;
    overflow-y: auto; z-index: 1035;
}
.app-main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.app-header {
    position: sticky; top: 0; height: var(--navbar-height);
    background: var(--navbar-bg); border-bottom: 1px solid rgba(0,0,0,0.2);
    display: flex; align-items: center; padding: 0 var(--spacing-xl); z-index: 1030;
}
.app-content { flex: 1; padding: var(--spacing-xl); max-width: var(--max-content-width); width: 100%; margin: 0 auto; }

/* ============================================================
   Bootstrap-compatible Grid & Utilities
   (minimal subset used by module templates)
============================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -7px;
    margin-left: -7px;
}
[class^="col-"], [class*=" col-"] {
    position: relative;
    width: 100%;
    padding-right: 7px;
    padding-left: 7px;
    box-sizing: border-box;
}
/* Default columns (mobile-first = 100%) */
.col-6  { flex: 0 0 50%;       max-width: 50%; }
.col-12 { flex: 0 0 100%;      max-width: 100%; }

/* lg: >= 992px */
@media (min-width: 992px) {
    .col-lg-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-lg-3  { flex: 0 0 25%;      max-width: 25%; }
    .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-6  { flex: 0 0 50%;      max-width: 50%; }
    .col-lg-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-lg-9  { flex: 0 0 75%;      max-width: 75%; }
    .col-lg-12 { flex: 0 0 100%;     max-width: 100%; }
}

/* input-group */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-append {
    display: flex;
    align-items: center;
}
.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Spacing utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-2 { gap: 0.5rem !important; }
.text-muted { color: #6c757d !important; }
.text-center { text-align: center !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: 0.875em !important; }
.w-100 { width: 100% !important; }

/* ============================================ */
/* Adressbuch / Telefonbuch (cb-) Styles        */
/* Shared between /contacts and /phonebook      */
/* ============================================ */
.cb-fullwidth {}

.cb-content {
    padding: 0.75rem 1rem 3rem;
}

.cb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.cb-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.15s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.cb-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(60,141,188,0.15);
    text-decoration: none;
}

.cb-card-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.cb-card-avatar {
    width: 72px; height: 72px; min-width: 72px;
    border-radius: 0.25rem; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 700;
}
.cb-card-title { flex: 1; min-width: 0; }
.cb-card-name {
    font-weight: 600; font-size: 0.95rem; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-card-custnr { font-size: 0.75rem; color: #9ca3af; margin-top: 0.15rem; font-weight: 500; }
.cb-card-address {
    font-size: 0.8rem; color: #6b7280; margin-top: 0.15rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-card-details { display: flex; flex-direction: column; gap: 0.35rem; padding-left: 0.25rem; }
.cb-card-detail { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: #6b7280; }
.cb-card-detail svg { flex-shrink: 0; color: #9ca3af; }
.cb-card-detail span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-card-detail-link { text-decoration: none; color: #6b7280; transition: color 0.15s; cursor: pointer; }
.cb-card-detail-link:hover { color: #3c8dbc; text-decoration: none; }

.cb-person-detail { color: #6b7280; font-size: 0.75rem; }

.cb-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 0.5rem; border-top: 1px solid #f3f4f6; margin-top: auto;
}
.cb-card-contacts-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.75rem; font-weight: 500; color: #6b7280;
    background: #f3f4f6; padding: 0.2rem 0.6rem; border-radius: 9999px;
}
.cb-card-contacts-badge svg { color: #9ca3af; }
.cb-card-arrow { color: #d1d5db; display: flex; align-items: center; transition: color 0.15s, transform 0.15s; }
.cb-card:hover .cb-card-arrow { color: #3c8dbc; transform: translateX(2px); }

.cb-empty-state { text-align: center; padding: 4rem 1rem; color: #9ca3af; }
.cb-empty-state svg { margin-bottom: 1rem; opacity: 0.4; }
.cb-empty-state p { font-size: 0.95rem; margin: 0 0 1.25rem; color: #6b7280; }

.cb-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
    border-radius: 0.5rem; border: 1px solid transparent;
    cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.cb-btn-primary { background: #3c8dbc; color: #fff; border-color: #3c8dbc; }
.cb-btn-primary:hover { background: #367fa9; border-color: #367fa9; }
.cb-btn-secondary { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.cb-btn-secondary:hover { background: #e5e7eb; }

.cb-section-title { font-size: 1rem; font-weight: 600; color: #374151; margin: 0 0 1rem 0; }

.cb-card-avatar-img { width: 72px; height: 72px; min-width: 72px; border-radius: 0.25rem; object-fit: cover; }

/* Person cards grid */
.cb-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
}

.cb-person-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 0.25rem;
    text-decoration: none; color: inherit; transition: all 0.15s;
}
.cb-person-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(60,141,188,0.15);
    text-decoration: none;
}

.cb-person-avatar {
    width: 60px; height: 60px; min-width: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #3c8dbc, #367fa9);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700;
}
.cb-person-avatar-img { width: 60px; height: 60px; min-width: 60px; border-radius: 50%; object-fit: cover; }
.cb-person-info { flex: 1; min-width: 0; }
.cb-person-name {
    font-weight: 600; font-size: 0.9rem; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cb-person-position { font-size: 0.8rem; color: #6b7280; }
.cb-person-company { font-size: 0.75rem; color: #3c8dbc; font-weight: 500; }
.cb-person-contacts {
    display: flex; flex-direction: column; gap: 0.15rem;
    font-size: 0.75rem; color: #6b7280; flex-shrink: 0; text-align: right;
}

@media (max-width: 768px) {
    .cb-fullwidth { overflow-x: hidden; }
    .cb-content { padding: 1rem; }
    .cb-grid { grid-template-columns: 1fr; }
    .cb-contacts-grid { grid-template-columns: 1fr; }
    .cb-person-card { flex-wrap: wrap; }
    .cb-person-contacts {
        width: 100%; flex-direction: row; gap: 0.75rem;
        text-align: left; padding-left: calc(60px + 0.75rem);
    }
}
@media (max-width: 480px) {
    .cb-content { padding: 0.75rem; }
    .cb-card { padding: 1rem; }
    .cb-person-card { padding: 0.75rem; }
}

/* Emoji-Icon-Ersatz (globaler Icon-Umschalter, Emoji-Modus) – verhält sich
   wie ein Inline-Icon an Stelle eines <i class="fa-…">. */
.emoji-icon {
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    display: inline-block;
    text-align: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* ============================================================
   KinOps Theme System
   ============================================================ */
:root {
    color-scheme: light;

    --color-primary: #1b3a57;
    --color-primary-dark: #102235;
    --color-primary-light: #3b6385;
    --color-secondary: #c24f26;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #dc2626;
    --color-info: #22d3ee;

    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-hover: #eef2f7;
    --color-border: #e2e8f0;
    --color-border-dark: #cbd5e1;

    --sidebar-bg: linear-gradient(180deg, #1b3a57 0%, #0f2233 100%);
    --sidebar-text: #dbeafe;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: rgba(34, 211, 238, 0.14);
    --sidebar-border: rgba(255, 255, 255, 0.14);
    --sidebar-header-bg: rgba(15, 34, 51, 0.65);

    --navbar-bg: #0f2233;
    --font-family: 'Space Grotesk', 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --font-size-base: 0.9375rem;

    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    --shadow-md: 0 14px 32px rgba(15, 23, 42, 0.16);
    --shadow-lg: 0 24px 52px rgba(15, 23, 42, 0.2);
    --shadow-focus: 0 0 0 3px rgba(34, 211, 238, 0.22);

    --radius-sm: 0.35rem;
    --radius: 0.5rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.5rem;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --color-primary: #60a5fa;
    --color-primary-dark: #3b82f6;
    --color-primary-light: #93c5fd;
    --color-secondary: #fb923c;
    --color-success: #22c55e;
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    --color-info: #22d3ee;

    --color-gray-50: #1b2733;
    --color-gray-100: #243240;
    --color-gray-200: #2b3947;
    --color-gray-300: #3b4a59;
    --color-gray-400: #64748b;
    --color-gray-500: #94a3b8;
    --color-gray-600: #cbd5e1;
    --color-gray-700: #dbeafe;
    --color-gray-800: #e2e8f0;
    --color-gray-900: #f8fafc;

    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-bg: #16202a;
    --color-bg-alt: #0f1720;
    --color-bg-hover: #1f2d3a;
    --color-border: #2b3947;
    --color-border-dark: #3b4a59;

    --sidebar-bg: linear-gradient(180deg, #0b1220 0%, #111a2a 100%);
    --sidebar-text: #cbd5e1;
    --sidebar-hover-bg: rgba(148, 163, 184, 0.12);
    --sidebar-active-bg: rgba(34, 211, 238, 0.16);
    --sidebar-border: rgba(148, 163, 184, 0.16);
    --sidebar-header-bg: rgba(2, 6, 23, 0.5);

    --navbar-bg: #0b1220;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.45);
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.48);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 26px 56px rgba(0, 0, 0, 0.58);
    --shadow-focus: 0 0 0 3px rgba(96, 165, 250, 0.26);
}

body {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

h1, h2, h3, h4, h5, h6,
.card-title,
.content-header h1 {
    color: var(--color-gray-900);
}

.main-header.navbar {
    background: linear-gradient(90deg, var(--navbar-bg) 0%, #1b3a57 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .main-header.navbar {
    background: linear-gradient(90deg, #0b1220 0%, #111a2a 100%);
}

.navbar-brand-link {
    gap: 0.65rem;
    color: #f8fafc;
}

.navbar-brand-img {
    height: 36px;
    max-width: 180px;
}

.navbar-brand-text {
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: 0;
}

.navbar-brand-text--fallback {
    display: none;
}

.main-sidebar {
    background: var(--sidebar-bg);
    box-shadow: 10px 0 28px rgba(15, 23, 42, 0.18);
}

.nav-sidebar .nav-header {
    color: rgba(226, 232, 240, 0.56);
    letter-spacing: 0.08em;
}

.nav-sidebar .nav-link {
    border-left: none;
    border-radius: 0.45rem;
    margin: 0.125rem 0.55rem;
    padding-left: 0.75rem;
}

.nav-sidebar .nav-link.active {
    box-shadow: inset 3px 0 0 #22d3ee;
    color: #f8fafc;
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #22d3ee;
}

.sidebar-collapse-btn {
    border-top-color: var(--sidebar-border);
}

.navbar-search-input,
.navbar-phonebook-input {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.11);
    border-radius: 0.5rem;
}

.navbar-search-input:focus,
.navbar-phonebook-input:focus {
    border-color: rgba(34, 211, 238, 0.54);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.theme-toggle {
    min-width: 2.75rem;
    justify-content: center;
}

.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
}

.theme-toggle-icon-dark {
    display: none;
}

html[data-theme="dark"] .theme-toggle-icon-light {
    display: none;
}

html[data-theme="dark"] .theme-toggle-icon-dark {
    display: inline-flex;
}

.content-wrapper,
.wrapper,
.page-body {
    background: var(--color-bg-alt);
}

.main-content {
    color: var(--color-text);
}

.main-footer,
.content-header,
.card,
.dashboard-card,
.empty-state,
.table-wrapper,
.modal-dialog,
.modal-card,
.dropdown-menu,
.notif-dropdown,
.toast,
.filter-card,
.info-box,
.detail-card,
.cb-card,
.cb-person-card,
.ss-dropdown,
.subnav-tab {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}

.card,
.dashboard-card,
.empty-state,
.table-wrapper,
.modal-dialog,
.modal-card,
.dropdown-menu,
.notif-dropdown,
.toast,
.filter-card,
.info-box,
.detail-card,
.cb-card,
.cb-person-card,
.ss-dropdown {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header,
.modal-header,
.notif-dropdown-header,
.data-table th,
.content-header,
.license-footer-note,
.license-tag,
.stat-item,
.quick-action,
.filter-card,
.ss-search-wrap {
    background: var(--color-gray-50);
    border-color: var(--color-border);
}

.data-table tbody tr:hover,
.dropdown-item:hover,
.user-menu-dropdown .dropdown-item:hover,
.notif-item:hover,
.ss-item:hover,
.quick-action:hover,
.subnav-tab:hover {
    background: var(--color-bg-hover);
}

.data-table th,
.form-group label,
.detail-card-title,
.cb-card-name,
.cb-section-title,
.cb-person-name,
.notif-item-title,
.toast-message,
.info-box-text {
    color: var(--color-gray-800);
}

.data-table td,
.cb-card-address,
.cb-card-detail,
.cb-card-detail-link,
.cb-person-detail,
.cb-person-position,
.footer-content {
    color: var(--color-text-muted);
}

.form-control,
.ss-trigger,
.ss-search,
.navbar-fav-link,
.btn-default {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}

.form-control:focus,
.ss-trigger:hover,
.ss-trigger:focus,
.ss-search:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.btn {
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-primary,
.cb-btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover,
.cb-btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #a94320;
    border-color: #a94320;
    color: #fff;
}

.btn-default:hover,
.btn-outline-secondary:hover,
.cb-btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-dark);
    color: var(--color-text);
}

.badge-admin,
.pagination-link.active,
.subnav-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.table-link,
.content-header .breadcrumb-item a,
.footer-link:hover,
.cb-person-company,
.cb-card-detail-link:hover {
    color: var(--color-primary);
}

.hero--blue,
.hero--slate,
.hero--dark,
.license-hero,
.about-header {
    background: linear-gradient(135deg, #1b3a57 0%, #0f2233 100%);
}

.small-box.bg-info,
.small-box.bg-primary {
    background-color: var(--color-primary) !important;
}

.small-box.bg-secondary {
    background-color: var(--color-secondary) !important;
}

.notif-badge {
    border-color: var(--navbar-bg);
}

html[data-theme="dark"] .navbar-fav-letter,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .notif-dropdown,
html[data-theme="dark"] .ss-dropdown {
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .notif-item,
html[data-theme="dark"] .cb-card-footer,
html[data-theme="dark"] .recent-item {
    border-color: var(--color-border);
}

html[data-theme="dark"] .notif-item.unread {
    background: rgba(96, 165, 250, 0.12);
}

html[data-theme="dark"] .notif-item.unread:hover {
    background: rgba(96, 165, 250, 0.18);
}

html[data-theme="dark"] .flash-success,
html[data-theme="dark"] .alert-success { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
html[data-theme="dark"] .flash-error,
html[data-theme="dark"] .alert-danger { background: rgba(248, 113, 113, 0.14); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
html[data-theme="dark"] .flash-warning,
html[data-theme="dark"] .alert-warning { background: rgba(251, 191, 36, 0.14); color: #fde68a; border-color: rgba(251, 191, 36, 0.35); }
html[data-theme="dark"] .flash-info,
html[data-theme="dark"] .alert-info { background: rgba(34, 211, 238, 0.13); color: #67e8f9; border-color: rgba(34, 211, 238, 0.34); }

/* Legacy module dark-mode compatibility */
html[data-theme="dark"] .responsibilities-body,
html[data-theme="dark"] .form-body,
html[data-theme="dark"] .page-editor,
html[data-theme="dark"] .srch-body,
html[data-theme="dark"] .cat-body,
html[data-theme="dark"] .cb-body,
html[data-theme="dark"] .cf-layout,
html[data-theme="dark"] .sf-body,
html[data-theme="dark"] .nd-body,
html[data-theme="dark"] .mc-wrap,
html[data-theme="dark"] .mc-main,
html[data-theme="dark"] .bulk-section,
html[data-theme="dark"] .fe-main,
html[data-theme="dark"] .error-fullwidth {
    background: var(--color-bg-alt) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .actions-card,
html[data-theme="dark"] .page-editor .editor-topbar,
html[data-theme="dark"] .page-editor .editor-wrapper,
html[data-theme="dark"] .page-editor .editor-sidebar,
html[data-theme="dark"] .page-editor .section-header,
html[data-theme="dark"] .orders-tabs-bar,
html[data-theme="dark"] .cat-card,
html[data-theme="dark"] .cat-picker,
html[data-theme="dark"] .cb-card,
html[data-theme="dark"] .cb-import-card,
html[data-theme="dark"] .cv-card,
html[data-theme="dark"] .cv-ical-pop,
html[data-theme="dark"] .cf-card,
html[data-theme="dark"] .ldc-card,
html[data-theme="dark"] .ldc-card--dropdown,
html[data-theme="dark"] .tc-card,
html[data-theme="dark"] .sf-card,
html[data-theme="dark"] .inv-form-card,
html[data-theme="dark"] .inv-tile,
html[data-theme="dark"] .mfr-card,
html[data-theme="dark"] .sk-card,
html[data-theme="dark"] .cve-nvd-card,
html[data-theme="dark"] .vu-card,
html[data-theme="dark"] .tf-card,
html[data-theme="dark"] .vi-card,
html[data-theme="dark"] .todo-card,
html[data-theme="dark"] .mc-toolbar,
html[data-theme="dark"] .mc-sidebar,
html[data-theme="dark"] .mc-cell,
html[data-theme="dark"] .mc-detail,
html[data-theme="dark"] .fe-toolbar,
html[data-theme="dark"] .fe-sidebar,
html[data-theme="dark"] .fe-dropzone,
html[data-theme="dark"] .br-card,
html[data-theme="dark"] .error-card,
html[data-theme="dark"] .mfa-qr-box,
html[data-theme="dark"] .mfa-secret-box {
    background: var(--color-bg) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
    box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .bulk-section-header,
html[data-theme="dark"] .sk-card-head,
html[data-theme="dark"] .todo-card-header,
html[data-theme="dark"] .cf-section-head,
html[data-theme="dark"] .ldc-section-head,
html[data-theme="dark"] .br-card-head,
html[data-theme="dark"] .vi-format-table th,
html[data-theme="dark"] .error-detail {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .cat-input,
html[data-theme="dark"] .cv-input,
html[data-theme="dark"] .cf-input,
html[data-theme="dark"] .cf-input-sm,
html[data-theme="dark"] .tc-input,
html[data-theme="dark"] .tc-textarea,
html[data-theme="dark"] .tc-select,
html[data-theme="dark"] .sf-input,
html[data-theme="dark"] .f-control,
html[data-theme="dark"] .device-sn-input,
html[data-theme="dark"] .sk-input,
html[data-theme="dark"] .ps-input,
html[data-theme="dark"] .ss-display,
html[data-theme="dark"] .loc-display,
html[data-theme="dark"] .fe-search,
html[data-theme="dark"] .bulk-table input,
html[data-theme="dark"] .mc-search,
html[data-theme="dark"] .mfa-secret-box code {
    background: var(--color-bg) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .cat-input:focus,
html[data-theme="dark"] .cv-input:focus,
html[data-theme="dark"] .cf-input:focus,
html[data-theme="dark"] .cf-input-sm:focus,
html[data-theme="dark"] .tc-input:focus,
html[data-theme="dark"] .tc-textarea:focus,
html[data-theme="dark"] .tc-select:focus,
html[data-theme="dark"] .sf-input:focus,
html[data-theme="dark"] .f-control:focus,
html[data-theme="dark"] .sk-input:focus,
html[data-theme="dark"] .ps-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: var(--shadow-focus) !important;
    outline: none !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--color-text-muted) !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .view-toggle,
html[data-theme="dark"] .cb-view-toggle,
html[data-theme="dark"] .ipam-view-toggle,
html[data-theme="dark"] .inv-view-btn,
html[data-theme="dark"] .inv-filter-input,
html[data-theme="dark"] .ldv-btn,
html[data-theme="dark"] .ldi-dp-trigger,
html[data-theme="dark"] .vt-btn,
html[data-theme="dark"] .vi-btn-outline,
html[data-theme="dark"] .btn-err-secondary,
html[data-theme="dark"] .wcfg-col-btn,
html[data-theme="dark"] #cveWidgetToggle,
html[data-theme="dark"] .bm-mode-btn,
html[data-theme="dark"] .sk-filterbar,
html[data-theme="dark"] .sk-search input,
html[data-theme="dark"] .sk-cat-chip,
html[data-theme="dark"] .cb-btn-secondary,
html[data-theme="dark"] .cat-picker-reset,
html[data-theme="dark"] .cat-color-trigger,
html[data-theme="dark"] #feViewGrid,
html[data-theme="dark"] .tc-btn-cancel,
html[data-theme="dark"] .cv-empty-icon {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .view-toggle:hover,
html[data-theme="dark"] .cb-view-toggle:hover,
html[data-theme="dark"] .ipam-view-toggle:hover,
html[data-theme="dark"] .inv-view-btn:hover,
html[data-theme="dark"] .ldv-btn:hover,
html[data-theme="dark"] .vt-btn:hover,
html[data-theme="dark"] .vi-btn-outline:hover,
html[data-theme="dark"] .btn-err-secondary:hover,
html[data-theme="dark"] .wcfg-col-btn:hover,
html[data-theme="dark"] #cveWidgetToggle:hover,
html[data-theme="dark"] .bm-mode-btn:hover,
html[data-theme="dark"] .sk-cat-chip:hover,
html[data-theme="dark"] .cb-btn-secondary:hover,
html[data-theme="dark"] .tc-btn-cancel:hover {
    background: var(--color-bg-hover) !important;
    border-color: var(--color-border-dark) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .wcfg-col-btn.active,
html[data-theme="dark"] .bm-mode-btn.active,
html[data-theme="dark"] .inv-view-btn.active,
html[data-theme="dark"] .view-toggle .active,
html[data-theme="dark"] .cb-view-toggle .active,
html[data-theme="dark"] .ipam-view-toggle .active {
    background: rgba(96, 165, 250, 0.16) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
    color: var(--color-primary-light) !important;
}

html[data-theme="dark"] .data-table,
html[data-theme="dark"] .vi-format-table,
html[data-theme="dark"] .bulk-table,
html[data-theme="dark"] .tickets-table,
html[data-theme="dark"] .table {
    color: var(--color-text) !important;
}

html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .bulk-table th,
html[data-theme="dark"] .table thead th {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .bulk-table td,
html[data-theme="dark"] .vi-format-table td,
html[data-theme="dark"] .table td {
    background: var(--color-bg) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .data-table tr:hover td,
html[data-theme="dark"] .bulk-table tr:hover td,
html[data-theme="dark"] .table tbody tr:hover td {
    background: var(--color-bg-hover) !important;
}

html[data-theme="dark"] .mfa-body,
html[data-theme="dark"] .cve-nvd-card p,
html[data-theme="dark"] .cat-empty,
html[data-theme="dark"] .cf-hint,
html[data-theme="dark"] .bulk-section-title,
html[data-theme="dark"] .todo-meta,
html[data-theme="dark"] .mc-legend-item,
html[data-theme="dark"] .mc-empty,
html[data-theme="dark"] .mc-date,
html[data-theme="dark"] .error-subtitle,
html[data-theme="dark"] .form-help,
html[data-theme="dark"] .page-editor .muted {
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .form-card h2,
html[data-theme="dark"] .actions-card h3,
html[data-theme="dark"] .cat-card h2,
html[data-theme="dark"] .cat-card-header,
html[data-theme="dark"] .cb-card-name,
html[data-theme="dark"] .cv-card h2,
html[data-theme="dark"] .cf-card h2,
html[data-theme="dark"] .ldc-section-title,
html[data-theme="dark"] .tc-card h2,
html[data-theme="dark"] .sf-card h2,
html[data-theme="dark"] .inv-form-card h2,
html[data-theme="dark"] .mfr-card h2,
html[data-theme="dark"] .sk-card-head,
html[data-theme="dark"] .cve-nvd-card h3,
html[data-theme="dark"] .vu-card h2,
html[data-theme="dark"] .tf-card h2,
html[data-theme="dark"] .vi-card h2,
html[data-theme="dark"] .todo-card-header,
html[data-theme="dark"] .mc-toolbar-title,
html[data-theme="dark"] .mc-nav-month,
html[data-theme="dark"] .mc-up-title,
html[data-theme="dark"] .mc-detail-title,
html[data-theme="dark"] .mc-agenda-title,
html[data-theme="dark"] .br-card-title,
html[data-theme="dark"] .error-card h1 {
    color: var(--color-gray-900) !important;
}

html[data-theme="dark"] .image-dropzone,
html[data-theme="dark"] .ldc-img-drop,
html[data-theme="dark"] .fe-dropzone {
    background: rgba(96, 165, 250, 0.08) !important;
    border-color: var(--color-border-dark) !important;
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .mc-cell.today,
html[data-theme="dark"] .ld-cal-cell.today {
    background: rgba(96, 165, 250, 0.14) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
}

html[data-theme="dark"] .mc-cell.other-month,
html[data-theme="dark"] .ld-cal-cell.empty {
    background: var(--color-gray-50) !important;
    color: var(--color-text-light) !important;
}

html[data-theme="dark"] .mfa-body,
html[data-theme="dark"] .ldc-wrap,
html[data-theme="dark"] .ldi-wrap {
    background: var(--color-bg-alt) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .dashboard-card[data-widget="cve_security"] #cveBody a[style*="display:flex"] {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .dashboard-card[data-widget="cve_security"] #cveBody a[style*="display:flex"]:hover {
    background: var(--color-bg-hover) !important;
}

html[data-theme="dark"] .dashboard-card[data-widget="cve_security"] #cveBody a[style*="display:flex"] span[style*="color:#374151"],
html[data-theme="dark"] .dashboard-card[data-widget="cve_security"] #cveBody a[style*="display:flex"] span[style*="color:#6b7280"] {
    color: var(--color-text) !important;
}

html[data-theme="dark"] .empty-card,
html[data-theme="dark"] .ldc-help-card,
html[data-theme="dark"] .af-card,
html[data-theme="dark"] .vcf-card,
html[data-theme="dark"] .wp-card,
html[data-theme="dark"] .resp-card,
html[data-theme="dark"] .inv-card {
    background: var(--color-bg) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
    box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .form-card .card-header,
html[data-theme="dark"] .page-editor .editor-breadcrumb,
html[data-theme="dark"] .page-editor .sidebar-toggle,
html[data-theme="dark"] .page-editor .sidebar-toggle-btn,
html[data-theme="dark"] .cat-card-header,
html[data-theme="dark"] .sf-card-header,
html[data-theme="dark"] .ldc-help-head,
html[data-theme="dark"] .ldc-submit-bar,
html[data-theme="dark"] .ldi-submit-bar,
html[data-theme="dark"] .bulk-actions,
html[data-theme="dark"] .mfr-card-header,
html[data-theme="dark"] .af-card-header,
html[data-theme="dark"] .inv-card-header,
html[data-theme="dark"] .page-card-header,
html[data-theme="dark"] .resp-card-header,
html[data-theme="dark"] .vs-card-header,
html[data-theme="dark"] .wp-card-header {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .form-card .card-header h2,
html[data-theme="dark"] .cat-card-header h2,
html[data-theme="dark"] .sf-card-header,
html[data-theme="dark"] .mfr-card-header h2,
html[data-theme="dark"] .af-card-title,
html[data-theme="dark"] .inv-card-header,
html[data-theme="dark"] .page-card-header h3,
html[data-theme="dark"] .resp-card-header h2,
html[data-theme="dark"] .vs-card-header h2,
html[data-theme="dark"] .wp-card-header h2,
html[data-theme="dark"] .empty-card h2,
html[data-theme="dark"] .empty-card h3 {
    color: var(--color-gray-900) !important;
}

html[data-theme="dark"] .cf-toggle,
html[data-theme="dark"] .cf-btn-cancel,
html[data-theme="dark"] .sk-btn-cancel,
html[data-theme="dark"] .ldc-cancel,
html[data-theme="dark"] .ldi-cancel,
html[data-theme="dark"] .ldc-add-acc,
html[data-theme="dark"] .ts-card-header-btn,
html[data-theme="dark"] .mc-sidebar-toggle,
html[data-theme="dark"] .fe-tree-root,
html[data-theme="dark"] .fe-tree-item {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .cf-toggle:hover,
html[data-theme="dark"] .cf-btn-cancel:hover,
html[data-theme="dark"] .sk-btn-cancel:hover,
html[data-theme="dark"] .ldc-cancel:hover,
html[data-theme="dark"] .ldi-cancel:hover,
html[data-theme="dark"] .ts-card-header-btn:hover,
html[data-theme="dark"] .mc-sidebar-toggle:hover,
html[data-theme="dark"] .fe-tree-root:hover,
html[data-theme="dark"] .fe-tree-item:hover {
    background: var(--color-bg-hover) !important;
    border-color: var(--color-border-dark) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] .fe-tree-root.active,
html[data-theme="dark"] .fe-tree-item.active {
    background: rgba(96, 165, 250, 0.18) !important;
    border-color: rgba(96, 165, 250, 0.48) !important;
    color: var(--color-primary-light) !important;
}

html[data-theme="dark"] #qaColBtns button,
html[data-theme="dark"] #wcfgColBtns button,
html[data-theme="dark"] button[onclick="invSaveCurrentView()"] {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] #qaColBtns button:hover,
html[data-theme="dark"] #wcfgColBtns button:hover,
html[data-theme="dark"] button[onclick="invSaveCurrentView()"]:hover {
    background: var(--color-bg-hover) !important;
    border-color: var(--color-border-dark) !important;
    color: var(--color-text) !important;
}

html[data-theme="dark"] #qaColBtns button[style*="#3c8dbc"],
html[data-theme="dark"] #wcfgColBtns button.active,
html[data-theme="dark"] #wcfgColBtns button[style*="#3c8dbc"] {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

html[data-theme="dark"] .sf-tip {
    background: var(--color-bg) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
    box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .sf-tip-header {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .sf-tip-body {
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .sf-tip-body strong {
    color: var(--color-gray-900) !important;
}

html[data-theme="dark"] .tc-mail-note,
html[data-theme="dark"] .cf-preview-card .cf-section-head,
html[data-theme="dark"] .cf-preview-card > *:not(.cf-section-head) {
    background: rgba(96, 165, 250, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.34) !important;
    color: var(--color-primary-light) !important;
}

html[data-theme="dark"] .cf-toggle-label strong,
html[data-theme="dark"] .ldc-help-label,
html[data-theme="dark"] .mfa-secret-code,
html[data-theme="dark"] .wa-key-name,
html[data-theme="dark"] .cb-import-card code {
    color: var(--color-gray-900) !important;
}

html[data-theme="dark"] .cf-toggle-label small,
html[data-theme="dark"] .ldc-help-text,
html[data-theme="dark"] .ldc-help-head,
html[data-theme="dark"] .ldc-hint,
html[data-theme="dark"] .wa-key-meta {
    color: var(--color-text-muted) !important;
}

html[data-theme="dark"] .cb-import-card code,
html[data-theme="dark"] pre,
html[data-theme="dark"] code {
    background: var(--color-gray-50) !important;
    border-color: var(--color-border) !important;
}

@media (max-width: 768px) {
    .navbar-brand-img {
        height: 30px;
        max-width: 128px;
    }

    .navbar-brand-text {
        display: none;
    }

    .theme-toggle {
        min-width: 2.35rem;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}
