:root {
    --ci-orange: #E94D1D;
    --ci-black: #151515;
    --ci-gray: #f9f9f9;
    --gray-bg: #f8f9fa;
    --border-radius: 12px;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition-base: all 0.2s ease;
}

body {
    background-color: var(--gray-bg);
    color: var(--ci-black);
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    font-size: 15px;
}

/* Farbe wird vererbt: Überschriften auf dunklen Containern (.page-header,
   .profile-card-header) bekommen ihr Weiß vom Container. Ein fester Farbwert
   hier kippt sie auf dunkel-auf-orange. */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Orangener Akzentbalken – opt-in statt auf jeder Überschrift der App. */
.heading-accent {
    border-left: 4px solid var(--ci-orange);
    padding-left: 0.5rem;
}

.page-header {
    background: linear-gradient(135deg, var(--ci-orange) 0%, #c33f17 100%);
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    border: none;
    padding: 0;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active {
    border-radius: 0.5rem;
}

/* Navigationspunkte mit Zaehler-Plakette (Systemnachrichten, Software-Planung). */
.nav-link--system-messages,
.nav-link--badged {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-system-message-badge {
    display: inline-grid;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.32rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fff;
    background: var(--ci-orange);
    box-shadow: 0 0 0 3px rgba(233, 77, 29, 0.14);
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1;
}

.btn-header,
.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.3rem 1.5rem;
    border-radius: 1rem;
    font-weight: 500;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-header:hover,
.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.btn-primary-header {
    background: var(--ci-black);
    border-color: var(--ci-black);
}

.btn-primary-header:hover {
    background: #2d2d2d;
    border-color: #2d2d2d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card,
.accordion-item,
.list-card,
.info-card,
.tracking-card,
.label-card,
.form-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-top: 2rem;
    transition: var(--transition-base);
    border: 1px solid #ddd;
}

.form-card {
    padding: 2.5rem;
    margin-top: 2rem;
}

.search-card {
    max-width: 350px;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--ci-orange);
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ci-orange);
    box-shadow: 0 0 0 0.2rem rgba(233, 77, 29, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    animation: shake 0.5s;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23E94D1D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.btn {
    border-radius: 0.8rem;
    font-weight: 600;
    transition: var(--transition-base);
}

button.btn.btn-secondary,
button.btn.btn-outline-secondary {
    background-color: #e0e0e0 !important;
    border: 2px solid #e0e0e0 !important;
    color: var(--ci-black) !important;
}

button.btn.btn-secondary:hover,
button.btn.btn-outline-secondary:hover {
    background-color: #e0e0e0 !important;
    border-color: var(--ci-orange) !important;
    color: var(--ci-black) !important;
    box-shadow: 0 0 0 3px rgba(233, 77, 29, 0.3) !important;
}

button.btn.btn-primary,
button.btn.btn-success {
    background-color: var(--ci-orange) !important;
    border: 2px solid var(--ci-orange) !important;
    color: #fff !important;
}

button.btn.btn-primary:hover,
button.btn.btn-success:hover {
    background-color: var(--ci-black) !important;
    border-color: var(--ci-orange) !important;
    color: #fff !important;
}

/* Muss die button.btn.btn-success-Regel oben schlagen (Spezifität 0,2,1),
   sonst rendert ein deaktivierter Button voll CI-orange und lügt den Nutzer an. */
button.btn.btn-success:disabled,
.btn-success:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.65;
}

/* Radio-Karten-Muster (<input class="btn-check"> + <label class="btn-outline-success">),
   ausschließlich in shipment-form.html. Deshalb auf label. qualifiziert – sonst erbt
   jeder gewöhnliche btn-outline-success-Button den "unselected"-Zustand einer
   Radio-Karte: grau, aufgeblasen, Icon per visibility:hidden weggeblendet. */
label.btn-outline-success {
    background-color: #f1f1f1 !important;
    border: 2px solid #ccc !important;
    color: var(--ci-black) !important;
    border-radius: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
}

label.btn-outline-success:hover {
    border-color: var(--ci-orange) !important;
}

.btn-check:checked + label.btn-outline-success {
    background-color: #fff !important;
    border-color: var(--ci-orange) !important;
    color: var(--ci-black) !important;
}

label.btn-outline-success:focus,
.btn-check:focus + label.btn-outline-success {
    outline: none !important;
    box-shadow: none !important;
}

label.btn-outline-success i {
    visibility: hidden;
    color: var(--ci-black);
}

.btn-check:checked + label.btn-outline-success i {
    visibility: visible;
    color: var(--ci-orange);
}

.search-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-bar .search-card {
    flex: 1 1 300px;
    max-width: 350px;
}

.search-bar .filter-select {
    flex: 0 1 220px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.form-actions .btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions .btn i {
    font-size: 0.9rem;
}

.accordion-button {
    background-color: #fff;
    color: var(--ci-black);
    font-weight: 600;
    border: none;
    transition: var(--transition-base);
}

.accordion-button:not(.collapsed) {
    background-color: #f1f1f1;
    color: var(--ci-black);
}

.accordion-button:hover {
    background-color: #f7f7f7;
}

.accordion-body {
    background-color: #fff;
}

.accordion-button:focus,
.accordion-button:focus-visible {
    outline: none;
    box-shadow: none;
}

table thead {
    background: #f8f9fa;
}

table th {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 1rem;
    border-bottom: 2px solid #dee2e6;
}

table td {
    font-size: 0.95rem;
    color: #212529;
    padding: 1rem;
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-action-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    background: transparent;
    transition: var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}

.btn-edit {
    color: #007bff;
    border-color: #007bff;
}

.btn-edit:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-tarifs {
    color: var(--ci-black);
    border-color: var(--ci-black);
}

.btn-tarifs:hover {
    background: var(--ci-black);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-copy {
    color: #1b1b1b;
    border-color: #1b1b1b;
}

.btn-copy:hover {
    background: #1b1b1b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-details {
    color: var(--ci-orange);
    border-color: var(--ci-orange);;
}

.btn-details:hover {
    background: #c33f17;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(233, 77, 29, 0.4);
    color: white;
}

.modal-content {
    border: 1.5px solid #ddd;
    border-radius: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.modal-header,
.modal-footer {
    background-color: var(--ci-gray);
    border-color: #ddd;
}

.modal-title {
    color: var(--ci-black);
    font-weight: 600;
}

hr {
    border-top: 1px solid #ddd;
    opacity: 1;
}

img.logo,
.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.empty-message {
    padding: 3rem !important;
    font-size: 1.1rem;
}

.empty-message i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .btn-header,
    .back-button {
        width: 100%;
        justify-content: center;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .row.g-4 {
        gap: 0 !important;
    }

    .col-md-4,
    .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* ------------------------------------------------------------------------------------------------
   Rückmelde-Knopf oben rechts (2026-08-10)

   Erscheint beim Überfahren der oberen rechten Ecke. 🔴 Auf Touch-Geräten gibt es kein Hover —
   dort steht er dauerhaft, sonst wäre die Funktion auf dem Tablet unerreichbar. Fokussierbar bleibt
   er immer: ein Element, das nur die Maus findet, ist per Tastatur nicht bedienbar.
   ------------------------------------------------------------------------------------------------ */
.feedback-corner {
    position: fixed;
    top: 0;
    right: 0;
    width: 128px;
    height: 96px;
    z-index: 1040;          /* unter Bootstrap-Modalen (1055), über dem Seiteninhalt */
    pointer-events: none;   /* die Ecke selbst fängt keine Klicks ab */
}

.feedback-trigger {
    position: absolute;
    top: 68px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 50%;
    background: #fff;
    color: #E94D1D;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-6px) scale(.94);
    transition: opacity .16s ease, transform .16s ease;
}

.feedback-corner:hover .feedback-trigger,
.feedback-trigger:focus-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.feedback-trigger:hover {
    background: #E94D1D;
    color: #fff;
}

@media (hover: none) {
    /* Kein Hover verfügbar — dauerhaft zeigen, sonst unerreichbar. */
    .feedback-trigger { opacity: .92; transform: none; }
}

.feedback-ziel {
    margin: 0 0 1rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: .82rem;
}

.feedback-preview {
    margin-top: .75rem;
}

.feedback-preview__label {
    display: block;
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7280;
}

.feedback-preview img {
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.feedback-status {
    margin: .85rem 0 0;
    padding: .55rem .75rem;
    border-radius: 8px;
    font-size: .84rem;
}

.feedback-status--info  { background: #eef2ff; color: #3730a3; }
.feedback-status--ok    { background: #ecfdf5; color: #065f46; }
.feedback-status--warn  { background: #fff8e6; color: #7a6000; }
.feedback-status--error { background: #fef2f2; color: #991b1b; }

/* ── Passkeys im Benutzerformular ───────────────────────────────────────── */
.pk-admin { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e9ecef; }
.pk-admin h3 { font-size: 1.05rem; font-weight: 600; color: #1f2937; }
.pk-admin__hint { font-size: .88rem; color: #6b7280; }
.pk-admin__empty { font-size: .9rem; color: #6b7280; margin: 0; }
.pk-admin__list { list-style: none; padding: 0; margin: .75rem 0 0; }
.pk-admin__list li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0;
    border-bottom: 1px solid #f1f3f5; }
.pk-admin__list li:last-child { border-bottom: 0; }
.pk-admin__label { font-weight: 600; color: #1f2937; }
.pk-admin__meta { font-size: .82rem; color: #6b7280; margin-right: auto; }
