/* Kleineres Toggle-Icon für Actions Dropdown */
.card-action-btn-toggle {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    min-width: 1.5rem !important;
    min-height: 1.5rem !important;
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
    padding: 0.15rem !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    font-size: 1rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem !important;
    transition: background 0.15s, color 0.15s;
}
.card-action-btn-toggle:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}
/* VNTRAI Main Stylesheet */

/* ===== ICON PROPORTIONS AND SIZING - FIX FOR COLLAPSE ===== */
.vntr-sidebar img,
.vntr-sidebar svg,
.vntr-sidebar i {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Ensure all nav icons maintain their size and proper color */
.vntr-nav-link img.vntr-nav-icon,
.vntr-nav-link svg.vntr-nav-icon,
.vntr-nav-link i.vntr-nav-icon,
.vntr-nav-link .vntr-nav-icon img,
.vntr-nav-link .vntr-nav-icon svg,
.vntr-nav-link .vntr-nav-icon i {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* Logo sizing fix */
.vntr-sidebar-logo {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
}

/* ===== SIDEBAR ICON COLORS OVERRIDE - PRIORITÄT #1 ===== */
.vntr-sidebar img.vntr-nav-icon,
.vntr-nav-icon,
.vntr-sidebar img,
.vntr-sidebar a img,
#vntrSidebar img,
img[src*="-black"] {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
}

.vntr-sidebar a,
.vntr-sidebar span,
.vntr-nav-link,
.vntr-nav-link span,
#vntrSidebar a,
#vntrSidebar span {
    color: white !important;
}

/* ===== SIDEBAR: Text und Icons weiß, aber bei Hover schwarz ===== */
.vntr-sidebar .vntr-nav-link,
.vntr-sidebar .vntr-nav-link span,
.vntr-sidebar a,
.vntr-sidebar a span {
    color: white !important;
    transition: color 0.15s;
}

.vntr-sidebar .vntr-nav-link:hover,
.vntr-sidebar .vntr-nav-link:hover span,
.vntr-sidebar a:hover,
.vntr-sidebar a:hover span {
    color: #000 !important;
    background-color: white !important;
}

/* Aktive Einträge behalten weißen Text beim Hover */
.vntr-sidebar .vntr-nav-link.active:hover,
.vntr-sidebar .vntr-nav-link.active:hover span,
.vntr-sidebar a.active:hover,
.vntr-sidebar a.active:hover span {
    color: white !important;
}

.vntr-sidebar .vntr-nav-link .vntr-nav-icon,
.vntr-sidebar a .vntr-nav-icon,
.vntr-sidebar img.vntr-nav-icon {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
    transition: filter 0.15s;
}

.vntr-sidebar .vntr-nav-link:hover .vntr-nav-icon,
.vntr-sidebar a:hover .vntr-nav-icon,
.vntr-sidebar .vntr-nav-link:hover img.vntr-nav-icon,
.vntr-sidebar a:hover img.vntr-nav-icon {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Force also SVG and icon fonts to black on hover */
.vntr-sidebar .vntr-nav-link:hover i,
.vntr-sidebar a:hover i,
.vntr-sidebar .vntr-nav-link:hover svg,
.vntr-sidebar a:hover svg {
    color: #111 !important;
    fill: #111 !important;
    filter: none !important;
}

/* ===== ACTIVE SIDEBAR NAVIGATION ===== */
.vntr-sidebar .vntr-nav-link.active {
    background-color: #FA7100 !important; /* Orange background for active state */
    border-left: 3px solid #FA7100 !important;
    color: white !important;
}

.vntr-sidebar .vntr-nav-link.active span {
    color: white !important;
    font-weight: 600 !important;
}

.vntr-sidebar .vntr-nav-link.active .vntr-nav-icon,
.vntr-sidebar .vntr-nav-link.active img.vntr-nav-icon {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
}

/* Active item should not change on hover */
.vntr-sidebar .vntr-nav-link.active:hover,
.vntr-sidebar .vntr-nav-link.active:hover span {
    color: white !important;
    background-color: #FA7100 !important; /* Keep orange on hover */
}

.vntr-sidebar .vntr-nav-link.active:hover .vntr-nav-icon,
.vntr-sidebar .vntr-nav-link.active:hover img.vntr-nav-icon {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
}

/* ===== LAYOUT STRUCTURE ===== */
/* Load Inter font (variable) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('https://rsms.me/inter/font-files/InterVariable.woff2?v=4.0') format('woff2');
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px; /* global base smaller */
    line-height: 1.35;
    letter-spacing: 0.1px;
}

/* Smaller general typography */
/* Re-scale headings for 12px base (kept readable) */
h1 { font-size: 1.55rem; }
h2 { font-size: 1.30rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.00rem; }
h5 { font-size: 0.85rem; }
h6 { font-size: 0.75rem; }
p, li, td, th, label, input, button, a, span { font-size: 0.85rem; }
small, .small { font-size: 0.65rem !important; }

/* Ensure sidebar text shrinks consistently */
.vntr-sidebar .vntr-nav-link span { font-size: 0.7rem !important; }

/* Utility for tighter spacing */
.text-tight { line-height: 1.2; }

.vntr-layout-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
    position: relative;
}

/* ===== SIDEBAR STYLING ===== */
.vntr-sidebar {
    width: 60px; /* Reduziert von 80px auf 60px */
    background: #0CC0DF !important;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    transition: width 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.vntr-sidebar:hover {
    width: 250px;
}

.vntr-sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0CC0DF;
    position: sticky;
    top: 0;
    z-index: 101;
    padding: 0 12px;
}

/* Logo stays centered in both states */
.vntr-sidebar-logo {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    flex-shrink: 0;
}

.vntr-nav-items {
    list-style: none;
    padding: 0;
    margin: 0;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.vntr-nav-item {
    margin: 0;
}

.vntr-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    position: relative;
}

/* Collapsed state: Center icons */
.vntr-sidebar:not(:hover) .vntr-nav-link {
    justify-content: center;
    padding: 15px 0;
}

.vntr-sidebar:not(:hover) .vntr-nav-icon {
    margin: 0 auto;
    position: static;
}

.vntr-nav-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    margin-right: 15px;
    transition: margin 0.3s ease;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.vntr-nav-link span {
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.vntr-sidebar:hover .vntr-nav-link span {
    opacity: 1;
}

.vntr-nav-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.4);
    margin: 10px 15px;
}

.vntr-user-container {
    margin-top: auto;
}

/* ===== MAIN CONTAINER ===== */
.vntr-main-container {
    flex: 1;
    margin-left: 60px; /* Reduziert von 80px */
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    padding: 0;
    margin-top: 0;
}

/* ===== CONTENT CONTAINER ===== */
.vntr-content-container {
    padding: 20px;
    margin: 0;
    flex: 1;
    background: white;
    height: 100vh;
    min-height: calc(100vh - 100px);
}

/* ===== FLASH MESSAGES ===== */
.vntr-flash-messages {
    padding: 15px 20px 0;
}

.vntr-flash-message {
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn-primary {
    background-color: #0CC0DF;
    border-color: #0CC0DF;
}

.btn-primary:hover {
    background-color: #0aa8c4;
    border-color: #0aa8c4;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .vntr-sidebar {
        width: 50px; /* Noch schmaler auf Mobile */
    }
    
    .vntr-sidebar:hover {
        width: 200px;
    }
    
    .vntr-main-container {
        margin-left: 50px; /* Updated for mobile */
    }
    
    .vntr-nav-link {
        padding: 12px 15px;
    }
    
    .vntr-nav-icon {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        max-width: 20px;
        max-height: 20px;
        margin-right: 12px;
        object-fit: contain;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-vntr-primary {
    color: #0CC0DF !important;
}

.bg-vntr-primary {
    background-color: #0CC0DF !important;
}

.border-vntr-primary {
    border-color: #0CC0DF !important;
}

/* ===== CONTEXT AREA FULL HEIGHT ===== */
.vntr-content-area {
    margin-left: 60px; /* Updated sidebar width */
    min-height: 100vh;
    position: relative;
}

.vntr-context-area {
    background: #E7E7E7;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    position: fixed;
    top: 0;
    height: 100vh;
    z-index: 500;
}

.vntr-main-content {
    flex: 1;
    background: white;
    border-radius: 0;
    padding: 30px;
    margin: 0;
    min-height: 100vh;
}

/* ===== TABLE IMPROVEMENTS ===== */
/* Alternierende Zeilenfarben */
.table-striped > tbody > tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.table-striped > tbody > tr:nth-child(even) {
    background-color: #ffffff;
}

/* Hover-Effekte für Tabellenzeilen */
.table-hover > tbody > tr:hover {
    background-color: #f0f8ff !important;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

/* Click-to-Open Styling */
.clickable-row {
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.clickable-row:hover {
    background-color: #e3f2fd !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Verbesserte Filter-Panels */
.filter-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Verbesserte Button-Styling */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-outline {
    background-color: white;
    border-color: #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

/* Primärfarbe Buttons */
.btn-primary {
    background-color: #0CC0DF !important;
    border-color: #0CC0DF !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #0aa5c7 !important;
    border-color: #0aa5c7 !important;
    color: white !important;
}

/* Akzentfarbe Buttons */
.btn-accent {
    background-color: #FA7100 !important;
    border-color: #FA7100 !important;
    color: white !important;
}

.btn-accent:hover {
    background-color: #e66400 !important;
    border-color: #e66400 !important;
    color: white !important;
}

/* Flash Messages Container - nicht breiter als regulärer Container */
.flash-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Page Header mit Toolbar */
.page-header {
    background: white;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
}

.page-header p {
    margin: 0.25rem 0 0 0;
    color: #6b7280;
}

.page-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

/* ===== COLLAPSED SIDEBAR OPTIMIZATIONS ===== */
/* When sidebar is collapsed, ensure proper centering and spacing */
.vntr-sidebar:not(:hover) {
    overflow: visible; /* Allow tooltips to show */
}

.vntr-sidebar:not(:hover) .vntr-nav-link {
    justify-content: center;
    padding: 15px 0;
    position: relative;
}

.vntr-sidebar:not(:hover) .vntr-nav-icon {
    margin: 0 auto;
    position: static;
}

.vntr-sidebar:not(:hover) .vntr-nav-link span {
    display: none; /* Hide text completely when collapsed */
}

/* Ensure icons are centered in collapsed state */
.vntr-sidebar:not(:hover) .vntr-nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tooltip on hover for collapsed state */
.vntr-sidebar:not(:hover) .vntr-nav-link:hover::after {
    content: attr(title);
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1001;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.vntr-sidebar:not(:hover) .vntr-nav-link:hover::before {
    content: '';
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #333;
    z-index: 1001;
}

/* ===== CARD LAYOUT IMPROVEMENTS ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2; /* Added for lint warnings */
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 3; /* Added for lint warnings */
}

/* Card hover effects */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Grid responsive improvements */
@media (max-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Status badge improvements */
.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Button consistency */
.btn-card {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-card:hover {
    transform: translateY(-1px);
}

/* ===== GESTACKTE ACTION-BUTTONS ===== */
/* Container für gestackte Action-Buttons */
.card-actions-stacked {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 10;
}

/* Einzelne Action-Buttons im gestackten Layout */
.card-action-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.375rem;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.card-action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    /* Kein transform, kein box-shadow */
}

/* Primäre Action-Button (Edit) */
.card-action-btn.primary {
    background: #0CC0DF;
    border-color: #0CC0DF;
    color: white;
}

.card-action-btn.primary:hover {
    background: #0aa5c7;
    border-color: #0aa5c7;
    color: white;
}

/* Danger Action-Button (Delete) */
.card-action-btn.danger {
    background: white;
    border-color: #fca5a5;
    color: #dc2626;
}

.card-action-btn.danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #dc2626;
}

/* Card Position Context für gestackte Buttons */
.card-with-actions {
    position: relative;
    overflow: visible;
}

/* Responsive Anpassungen für gestackte Buttons */
@media (max-width: 768px) {
    .card-actions-stacked {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.125rem;
    }
    
    .card-action-btn {
        width: 1.75rem;
        height: 1.75rem;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
}

/* SVG Icon color handling for navigation */
.vntr-nav-link svg.vntr-nav-icon {
    color: #374151 !important;
    stroke: currentColor !important;
    fill: currentColor !important;
}

.vntr-nav-link.active svg.vntr-nav-icon {
    color: #FA7100 !important;
    stroke: currentColor !important;
    fill: currentColor !important;
}

.vntr-nav-link:hover svg.vntr-nav-icon {
    color: #FA7100 !important;
    stroke: currentColor !important;
}

/* Special handling for filled vs outlined icons */
.vntr-nav-link svg.vntr-nav-icon[fill="currentColor"] {
    fill: currentColor !important;
    stroke: none !important;
}

.vntr-nav-link svg.vntr-nav-icon[fill="none"] {
    fill: none !important;
    stroke: currentColor !important;
}

/* ===== KNOWLEDGE DASHBOARD TAB STYLES ===== */
.tab-button {
    border-bottom: 2px solid transparent;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border-radius: 0;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.tab-button:hover {
    color: #0CC0DF;
    border-bottom-color: #0CC0DF;
}

.tab-button.active {
    color: #0CC0DF;
    border-bottom-color: #0CC0DF;
    font-weight: 600;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* Knowledge Dashboard specific card styles */
.card-body {
    padding: 1.5rem;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.card-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

/* Filter panel improvements */
.filter-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Button sizes */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-success {
    color: #10b981;
}

.status-warning {
    color: #f59e0b;
}

.status-error {
    color: #ef4444;
}

.status-info {
    color: #0CC0DF;
}

/* Page header improvements */
.page-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 1rem;
}

.page-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-toolbar .btn {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-toolbar {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .page-toolbar .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}