/* =================================================================
   Portal Customer - Gemeinsame Styles
   Extrahiert aus 12+ Razor-Seiten zur Vermeidung von CSS-Duplikation
   ================================================================= */

/* -------------------- Page Container -------------------- */
.page-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 20px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dc3545;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* -------------------- Search -------------------- */
.search-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

.search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}

.search-field {
    flex: 1;
    min-width: 180px;
}

.search-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-field input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* -------------------- Buttons -------------------- */
.btn-modern {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-search {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-search:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-reset {
    background: white;
    color: #6c757d;
    border-color: #6c757d;
}

.btn-reset:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.btn-download {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #28a745;
    border-color: #28a745;
}

.btn-download:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* -------------------- Action Buttons -------------------- */
.btn-action {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-csv,
.btn-pdf,
.btn-print,
.btn-details,
.btn-buchhaltung,
.btn-mde {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    background: white;
    text-decoration: none;
    cursor: pointer;
}

.btn-csv { color: #28a745; border: 2px solid #28a745; }
.btn-csv:hover { background: #28a745; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3); }

.btn-pdf { color: #dc3545; border: 2px solid #dc3545; }
.btn-pdf:hover { background: #dc3545; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3); }

/* Drucken - bewusst neutral (Fast-Schwarz), damit es neben dem roten PDF-Knopf nicht wie
   ein zweiter Download aussieht. Das eine liefert die Rechnung, das andere Papier. */
.btn-print { color: #212529; border: 2px solid #212529; }
.btn-print:hover { background: #212529; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(33, 37, 41, 0.3); }

.btn-details { color: #007bff; border: 2px solid #007bff; }
.btn-details:hover { background: #007bff; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); }

/* Buchhaltungsansicht - eigene Farbe, damit "Details" und "Buchhaltung" auf einen Blick
   unterscheidbar bleiben und nicht wie zwei Wege zur selben Seite aussehen. */
.btn-buchhaltung { color: #0f5132; border: 2px solid #0f5132; }
.btn-buchhaltung:hover { background: #0f5132; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3); }

.btn-mde { color: #6f42c1; border: 2px solid #6f42c1; }
.btn-mde:hover { background: #6f42c1; color: white; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3); }

/* -------------------- Lot-/Chargenkennzeichnung -------------------- */
/* Nur bei LOT-gefuehrten Artikeln (LOTNR gefuellt) - erscheint unter der Bezeichnung,
   damit fuer die grosse Mehrheit ohne Lot keine leere Tabellenspalte entsteht. */
.lot-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 11px;
    font-weight: 600;
    font-family: "Courier New", monospace;
    white-space: nowrap;
}

/* -------------------- Modern Table -------------------- */
.modern-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modern-table thead {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.modern-table thead th {
    padding: 14px 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
}

.modern-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s;
}

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

.modern-table tbody td {
    padding: 12px;
    font-size: 13px;
    color: #000;
    vertical-align: middle;
}

/* -------------------- Badges -------------------- */
.invoice-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #17a2b8;
    color: white;
}

.warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #dc3545;
    color: white;
    margin-top: 4px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #17a2b8;
    color: white;
    margin-top: 4px;
}

/* -------------------- Pagination (HEGA rot) -------------------- */
.pagination {
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination .page-link {
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #e0e0e0;
    color: #999;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: transparent;
    transform: none;
    box-shadow: none;
}

.pagination .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination .form-control:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.pagination label,
.pagination span {
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
}

/* -------------------- Filter Checkboxes -------------------- */
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #000;
}

/* -------------------- Info Banner -------------------- */
.info-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
    font-size: 13px;
    color: #000;
}

/* -------------------- Quick Links -------------------- */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* -------------------- Textfarbe: kein Grau (HEGA-Regel, portalweit) --------------------
   Graue Hilfstexte sind schlecht lesbar -> immer Schwarz.
   Gilt fuer Bootstrap-Utility-Klassen auf hellen Hintergruenden.
   Ausnahmen bewusst NICHT angefasst: Disabled-Affordances (.disabled),
   verblasstes Weiss auf farbigen Boxen (.text-white-50 -> dort solides Weiss). */
.text-muted,
.text-secondary,
small.text-muted,
.form-text.text-muted {
    color: #000 !important;
}
