/* Modernes Design für LV/LM-Infotool Frontend */

:root {
    --primary-color: #004C97;
    --primary-dark: #003a7a;
    --primary-light: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 1200px;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background-color: var(--bg-white);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 76, 151, 0.25);
}

.form-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
}

/* Entry Cards */
.entry-card {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 3px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.entry-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.entry-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.entry-card-title-wrapper {
    margin-bottom: 0.4rem;
}

.entry-card-title-wrapper .entry-card-title {
    margin-bottom: 0;
}

.primary-system-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    margin-left: auto;
    white-space: nowrap;
}

.primary-system-indicator--yes {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
}

.primary-system-indicator--no {
    padding: 0;
    background: transparent;
    color: var(--danger-color);
    font-size: 1rem;
}

.primary-system-indicator .bi {
    line-height: 1;
}

.entry-card-preview {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-card-value {
    font-size: 0.8rem;
    color: var(--text-dark);
    line-height: 1.4;
    margin-top: 0.2rem;
}

.entry-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.entry-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.entry-card-meta .fi {
    width: 16px;
    height: 12px;
}

.entry-card-link {
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    transition: var(--transition);
    height: 100%;
}

.entry-card-link:hover {
    color: var(--primary-dark);
}

.edit-article-btn {
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm);
}

.edit-article-btn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.1);
}

.entry-card .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Filters */
.filter-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.filter-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Schnellsuche */
.quick-search-section {
    margin-bottom: 2rem;
}

.quick-search-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.quick-search-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.quick-search-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-search-btn .fi {
    width: 20px;
    height: 15px;
    border-radius: 3px;
}

.btn-link {
    color: var(--text-muted);
    font-weight: 500;
}

.btn-link:hover {
    color: var(--primary-color);
}

.btn-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.btn-link .bi-chevron-down {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Article Detail */
.article-header {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.field-group {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.field-group:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.field-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.field-value {
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    font-size: 1rem;
    background-color: rgba(0, 76, 151, 0.08);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.field-feedback {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* Similar Articles */
.similar-articles {
    margin-top: 3rem;
}

.similar-article-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    min-height: 200px;
}

.similar-article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: inherit;
    text-decoration: none;
}

.similar-article-header h5 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.similar-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.similar-article-meta .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
}

.similar-article-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.similar-article-value {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    word-wrap: break-word;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .entry-card {
        padding: 0.75rem;
    }
    
    .filter-section {
        padding: 1rem;
    }
    
    .article-header,
    .article-content {
        padding: 1.5rem;
    }
    
    .entries-list .col-sm-6 {
        margin-bottom: 0;
    }
    
    .field-group {
        padding: 0.75rem;
    }
    
    .article-content .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .quick-search-buttons {
        gap: 0.5rem;
    }
    
    .quick-search-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .entries-list .col-lg-3 {
        margin-bottom: 0.5rem;
    }
    
    .entry-card-title {
        font-size: 0.85rem;
    }
    
    .entry-card-meta {
        font-size: 0.7rem;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Flag Icons */
.fi {
    border-radius: 3px;
}

/* Admin Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: var(--bg-light);
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card-body {
    padding: 2rem;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.admin-form-label i {
    margin-right: 0.25rem;
}

.admin-form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.admin-form-control.form-control {
    display: block;
    width: 100%;
}

.admin-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 76, 151, 0.25);
}

.btn-admin-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-admin-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-admin-primary:active {
    transform: translateY(0);
}

.modern-alert {
    border-radius: 6px;
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.modern-alert i {
    margin-right: 0.5rem;
}

/* Responsive für Login */
@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card-header {
        padding: 1.5rem;
    }
    
    .login-card-header h3 {
        font-size: 1.25rem;
    }
    
    .login-card-body {
        padding: 1.5rem;
    }
}

/* Dashboard Chart Container */
.dashboard-chart-container {
    height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.dashboard-chart-container canvas {
    max-height: 100%;
}

/* Scrollbar Styling für Chart Container */
.dashboard-chart-container::-webkit-scrollbar {
    width: 8px;
}

.dashboard-chart-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dashboard-chart-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.dashboard-chart-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dashboard Stat Cards */
.admin-page-header {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.admin-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.admin-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.dashboard-stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.dashboard-stat-card:hover::before {
    opacity: 1;
}

.dashboard-stat-card.border-warning::before {
    background: linear-gradient(90deg, var(--warning-color), #ffd54f);
    opacity: 1;
}

.dashboard-stat-card.border-success::before {
    background: linear-gradient(90deg, var(--success-color), #66bb6a);
    opacity: 1;
}

.dashboard-stat-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 0.875rem;
}

.dashboard-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0, 76, 151, 0.08);
    transition: all 0.2s ease;
}

.dashboard-stat-card:hover .dashboard-stat-icon {
    transform: scale(1.05);
    background: rgba(0, 76, 151, 0.12);
}

.dashboard-stat-icon i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.dashboard-stat-card.border-warning .dashboard-stat-icon {
    background: rgba(255, 193, 7, 0.1);
}

.dashboard-stat-card.border-warning .dashboard-stat-icon i {
    color: var(--warning-color);
}

.dashboard-stat-card.border-success .dashboard-stat-icon {
    background: rgba(40, 167, 69, 0.1);
}

.dashboard-stat-card.border-success .dashboard-stat-icon i {
    color: var(--success-color);
}

.dashboard-stat-card .dashboard-stat-icon.border-info {
    background: rgba(23, 162, 184, 0.1);
}

.dashboard-stat-card .dashboard-stat-icon.border-info i {
    color: var(--info-color);
}

.dashboard-stat-card [class*="text-info"] {
    color: var(--info-color) !important;
}

.dashboard-stat-card [class*="text-success"] {
    color: var(--success-color) !important;
}

.dashboard-stat-card [class*="text-warning"] {
    color: var(--warning-color) !important;
}

.dashboard-stat-card [class*="text-primary"] {
    color: var(--primary-color) !important;
}

.dashboard-stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    letter-spacing: 0.01em;
}

.dashboard-stat-value {
    margin: 0.5rem 0 1rem 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dashboard-stat-value h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.dashboard-stat-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-stat-footer small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-stat-card {
        padding: 1.5rem 1.25rem;
    }
    
    .dashboard-stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .dashboard-stat-icon i {
        font-size: 1.1rem;
    }
    
    .dashboard-stat-value h2 {
        font-size: 1.75rem;
    }
    
    .dashboard-stat-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .dashboard-stat-card {
        padding: 1.25rem 1rem;
    }
    
    .dashboard-stat-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .dashboard-stat-value h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-stat-value {
        justify-content: flex-start;
    }
}

