/* =========================
   Modern Backend UI
========================= */

.modern-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075)!important;
}

.modern-card-header {
    background: #fff;
    border: 0;
    padding: 16px 18px;
}

.modern-table {
    margin-bottom: 0;
}

.modern-table thead th {
    background: #f8fafc;
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-top: 0;
    border-bottom: 1px solid #edf1f5;
    padding: 16px 18px;
    white-space: nowrap;
}

.modern-table tbody td {
    padding: 18px;
    vertical-align: middle;
    border-top: 1px solid #f1f3f5;
}

.modern-table tbody tr:hover {
    background: #f8fbff;
}

/* Icons */

.modern-icon-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, #007bff, #17a2b8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(0, 123, 255, 0.22);
}

.modern-icon-box-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 8px 18px rgba(40, 167, 69, 0.22);
}

.modern-icon-box-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.22);
}

.modern-icon-box-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.22);
}

/* Badges / Kennzahlen */

.metric-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.metric-total {
    color: #0c5460;
    background: #d1ecf1;
}

.metric-done {
    color: #155724;
    background: #d4edda;
}

.metric-open {
    color: #856404;
    background: #fff3cd;
}

.metric-danger {
    color: #721c24;
    background: #f8d7da;
}

.metric-muted {
    color: #495057;
    background: #e9ecef;
}

/* Progress */

.modern-progress {
    background-color: #edf1f5;
    border-radius: 999px;
}

.modern-progress .progress-bar {
    border-radius: 999px;
}

/* Buttons */

.btn-modern {
    border-radius: 999px;
    font-weight: 600;
    padding: 7px 14px;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.22);
}

.btn-modern:hover {
    box-shadow: 0 9px 20px rgba(0, 123, 255, 0.32);
}

/* Empty State */

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    margin: 0 auto;
    background: #f4f6f9;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

/* Allgemein */

.badge {
    font-weight: 600;
}

.modern-truncate {
    min-width: 0;
}

@media (max-width: 768px) {
    .modern-table tbody td {
        padding: 14px;
    }

    .modern-text-truncate {
        max-width: 220px !important;
    }
}


/* =========================
   Modern Detail / Edit Cards
========================= */

.modern-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0;
}

.modern-toolbar {
    background: #fff;
    border-radius: 18px;
    border: 0;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    overflow: hidden;
}

.modern-toolbar-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f3f5;
}

.modern-toolbar-body {
    padding: 18px 20px;
}

.modern-search {
    border-radius: 999px;
    padding-left: 42px;
    height: 42px;
    border: 1px solid #e9ecef;
}

.modern-search-wrap {
    position: relative;
}

.modern-search-wrap .modern-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    z-index: 2;
}

.modern-filter-group .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 7px 16px;
    margin-right: 6px;
}

.modern-filter-group .btn.active {
    color: #fff;
}

.modern-filter-group .btn-outline-secondary.active {
    background: #6c757d;
    border-color: #6c757d;
}

.modern-filter-group .btn-outline-success.active {
    background: #28a745;
    border-color: #28a745;
}

.modern-filter-group .btn-outline-warning.active {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.modern-article-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    transition: box-shadow .15s ease-in-out;
}

.modern-article-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .09);
}

.modern-article-card.is-open {
    border-left: 5px solid #ffc107;
}

.modern-article-card.is-done {
    border-left: 5px solid #28a745;
}

.modern-article-header {
    background: #fff;
    border-bottom: 1px solid #f1f3f5;
    padding: 16px 18px;
}

.modern-article-body {
    padding: 20px;
}

.modern-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    line-height: 1.8;
}

.modern-meta-label {
    font-weight: 700;
    color: #495057;
}

.modern-meta-value {
    font-weight: 600;
    color: #212529;
}

.copy-value {
    cursor: pointer;
}

.copy-value:hover {
    text-decoration: underline;
}

.btn-copy-modern {
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.4;
}

.btn-xs {
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
}

.modern-form-section {
    background: #f8fafc;
    border: 1px solid #edf1f5;
    border-radius: 16px;
    padding: 16px;
}

.modern-price-box {
    background: #f8fafc;
    border: 1px solid #edf1f5;
    border-radius: 16px;
    padding: 16px;
}

.modern-price-box .input-group-text {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.modern-price-box .form-control {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.modern-form-label {
    font-weight: 700;
    color: #495057;
    font-size: 13px;
}

.modern-save-footer {
    border-top: 1px solid #f1f3f5;
    padding-top: 16px;
    margin-top: 8px;
}

.modern-shop-link {
    font-weight: 600;
    color: #007bff;
}

.modern-shop-link:hover {
    color: #0056b3;
    text-decoration: none;
}

.modern-oe-badge {
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 600;
}

.note-editor {
    width: 100% !important;
}

.note-editor .note-editable {
    min-height: 250px;
}

.note-toolbar {
    white-space: normal;
}

@media (max-width: 768px) {
    .modern-article-body {
        padding: 16px;
    }

    .modern-toolbar-header,
    .modern-toolbar-body {
        padding: 16px;
    }

    .modern-filter-group .btn {
        margin-bottom: 6px;
    }
}
