:root {
    --bs-primary: #9B0026;
    --bs-primary-rgb: 155, 0, 38;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #9B0026;
    --bs-btn-border-color: #9B0026;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #F70743;
    --bs-btn-hover-border-color: #F70743;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #F70743;
    --bs-btn-active-border-color: #F70743;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #9B0026;
    --bs-btn-disabled-border-color: #9B0026;
}

/* ==========================================================================
   1. Basis-Setup & Layout
   ========================================================================== */

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    /* padding: 20px; */
    background-color: #f5f5f5;
    color: #333;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* ==========================================================================
   1.1 GDS Header & responsive Navigation
   ========================================================================== */

.gds-header {
    width: 100%;
}

.gds-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 1rem;
    min-width: 0;
}

.gds-header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.gds-header-brand a {
    min-width: 0;
}

.gds-header-logo {
    height: 40px;
    width: auto;
    margin-right: 15px;
    flex-shrink: 0;
}

.gds-header-brand .fs-5 {
    white-space: nowrap;
}

.gds-header-company {
    padding: 0 1rem 0.75rem 1rem;
}

.gds-header-company span {
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Desktop Navigation
   -------------------------------------------------------------------------- */

.gds-main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: nowrap;
    min-width: 0;
}

.gds-main-navigation a {
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
}

.gds-main-navigation a:hover,
.gds-main-navigation a:focus {
    color: #9B0026;
}

.gds-main-navigation a:focus-visible {
    outline: 2px solid #9B0026;
    outline-offset: 3px;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Hamburger Button
   -------------------------------------------------------------------------- */

.gds-menu-toggle {
    display: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 8px;
    margin: 0;
    border: 1px solid #9B0026;
    border-radius: 6px;
    background: #fff;
    color: #9B0026;
    cursor: pointer;
}

.gds-menu-toggle:hover,
.gds-menu-toggle:focus {
    background: #fff1f3;
}

.gds-menu-toggle:focus-visible {
    outline: 3px solid rgba(247, 7, 67, 0.35);
    outline-offset: 2px;
}

.gds-menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    height: 100%;
}

.gds-menu-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #9B0026;
    border-radius: 2px;
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

@media (max-width: 1500px) {

    .gds-header-main {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gds-header-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .gds-header-brand .fs-5 {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gds-menu-toggle {
        display: block;
    }

    .gds-main-navigation {
        display: none;
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid #dee2e6;
    }

    .gds-main-navigation.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
    }

    .gds-main-navigation a {
        display: block;
        width: 100%;
        padding: 12px 10px;
        border-bottom: 1px solid #e5e5e5;
        color: #333;
        white-space: normal;
    }

    .gds-main-navigation a:last-child {
        border-bottom: 0;
    }

    .gds-main-navigation a:hover,
    .gds-main-navigation a:focus {
        background-color: #fff1f3;
        color: #9B0026;
    }

    .gds-main-navigation a:focus-visible {
        outline: 2px solid #9B0026;
        outline-offset: -2px;
    }

    .gds-header-company {
        padding: 0 1rem 0.75rem 1rem;
    }
}

/* --------------------------------------------------------------------------
   Sehr kleine Bildschirme
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {

    .gds-header-main {
        padding: 0.75rem;
    }

    .gds-header-logo {
        height: 36px;
        margin-right: 10px;
    }

    .gds-header-brand .fs-5 {
        font-size: 1rem !important;
    }

    .gds-header-company {
        padding: 0 0.75rem 0.65rem 0.75rem;
    }

    .gds-header-company span {
        font-size: 0.85rem;
    }
}

/* --------------------------------------------------------------------------
   Reduzierte Bewegung
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .gds-main-navigation,
    .gds-menu-toggle,
    .gds-main-navigation a {
        transition: none !important;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    text-align: center;
    margin-top: 50px;
    font-size: 0.9em;
    color: #666;
}

/* ==========================================================================
   2. Login & Allgemeine Komponenten
   ========================================================================== */

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container input {
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 8px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
}

.error {
    color: red;
}

/* ==========================================================================
   3. Standard Checklisten-Styles
   ========================================================================== */

.checklist-container {
    /* max-width: 900px; */
    margin: 0 auto;
}

.checklist-section {
    margin-bottom: 32px;
}

.checklist-section h3 {
    font-size: 1.2rem;
    color: #1e3a8a;
    background: #f8fafc;
    padding: 10px 12px;
    border-left: 4px solid #1e3a8a;
}

.sub-block {
    margin: 16px 0;
    padding: 10px 15px;
    border-left: 2px solid #cbd5e1;
}

.sub-item {
    margin-left: 28px;
    font-size: 0.9rem;
    color: #475569;
}

.check-value {
    background: #f8fafc;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 10px;
    min-height: 38px;
}

.check-selected {
    font-weight: 600;
}

.check-not-selected {
    color: #adb5bd;
}

/* ==========================================================================
   4. Spezifische Spezifitäts-Overrides (Gegen Bootstrap-Konflikte)
   ========================================================================== */

body .checklist-container {
    /* max-width: 900px !important; */
    margin: 0 auto;
}

body .checklist-section {
    margin-bottom: 32px;
}

body .checklist-section h3 {
    font-size: 1.2rem;
    color: #9B0026;
    background: #f8fafc;
    padding: 10px 12px;
    border-left: 4px solid #9B0026;
}

body .sub-block {
    margin: 16px 0;
    padding: 10px 15px;
    border-left: 2px solid #cbd5e1;
}

body .sub-item {
    margin-left: 28px;
    font-size: 0.9rem;
    color: #475569;
}

body .check-value {
    background: #f8fafc;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 10px;
    min-height: 38px;
}

body .check-selected {
    font-weight: 600;
}

body .check-not-selected {
    color: #adb5bd;
}

.form-check-input {
    border: solid 1px #9b0026;
}

.dashboard-accordion-item {
    background-color: #f8f9fa;
    border: 1px solid #9B0026;
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
}

.dashboard-accordion-item > .accordion-header .accordion-button {
    background: linear-gradient(180deg, #F70743 0%, #9B0026 100%) !important;
    color: #fff !important;
    font-weight: 600;
    border: 0;
}

.dashboard-accordion-item > .accordion-header .accordion-button:not(.collapsed) {
    background: linear-gradient(180deg, #F70743 0%, #9B0026 100%) !important;
    color: #fff !important;
    box-shadow: none;
    border: 0;
}

#customerAccordion > .accordion-item > .accordion-header .accordion-button,
#adminAccordion > .accordion-item > .accordion-header .accordion-button {
    background: linear-gradient(180deg, #F70743 0%, #9B0026 100%) !important;
    color: #fff !important;
    font-weight: 600;
}

#customerAccordion > .accordion-item > .accordion-header .accordion-button:not(.collapsed),
#adminAccordion > .accordion-item > .accordion-header .accordion-button:not(.collapsed) {
    background: linear-gradient(180deg, #F70743 0%, #9B0026 100%) !important;
    color: #fff !important;
    box-shadow: none;
}

/* Firmen-Accordions innerhalb der Kundenübersicht */
#companyAccordion > .accordion-item {
    border: 1px solid #e5c1ca;
    border-radius: 6px;
    margin-bottom: 6px;
    overflow: hidden;
}

#companyAccordion > .accordion-item > .accordion-header .accordion-button {
    background-color: #fff1f3;
    color: #9B0026;
    font-weight: 500;
    box-shadow: none;
}

#companyAccordion > .accordion-item > .accordion-header .accordion-button:not(.collapsed) {
    background-color: #fce0e6;
    color: #9B0026;
    box-shadow: inset 0 -1px 0 #e5c1ca;
}

#companyAccordion > .accordion-item > .accordion-header .accordion-button::after {
    filter: none;
}

#companyAccordion > .accordion-item > .accordion-header .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.gds-table-header {
    background: linear-gradient(180deg, #F70743 0%, #9B0026 100%) !important;
    color: #fff !important;
}

.gds-table-header th {
    background: transparent !important;
    color: #fff !important;
    border-color: #9B0026 !important;
}

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

.upload-file-select {
    background-color: #fff1f3;
    /* border: 1px solid #9B0026;
    border-radius: 8px; */
    padding: 12px 16px 16px 16px;
}

.upload-file-select label {
    color: #9B0026;
}

.upload-file-select .form-control {
    border: 1px solid #9B0026;
}

.upload-file-select .form-control:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.upload-customer-select {
    background-color: #fff1f3;
    border: 1px solid #9B0026;
    border-radius: 8px;
    padding: 0px 16px 12px 16px;
    margin-bottom: 20px;
}

.upload-customer-select label {
    color: #9B0026;
}

.upload-customer-select .form-select {
    border: 1px solid #9B0026;
}

.upload-customer-select .form-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.archive-input-select {
    background-color: #fff1f3;
    padding: 12px 16px 16px 16px;
}

.archive-input-select label {
    color: #9B0026;
}

.archive-input-select .form-control {
    border: 1px solid #9B0026;
}

.archive-input-select .form-control:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.align-items-end {
    margin: 0px !important;
    height: 90px;
}

.upload-filter-form .input-group .form-control,
.upload-filter-form .form-select {
    border-color: #9B0026;
}

.upload-filter-form .input-group .form-control:focus,
.upload-filter-form .form-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.checklist-section input[type="text"],
.checklist-section input[type="email"],
.checklist-section input[type="url"],
.checklist-section input[type="number"],
.checklist-section select {
    border: 1px solid #9B0026;
    border-radius: 6px;
    padding: 8px 12px;
    background-color: #fff1f3;
}

.checklist-section input[type="text"]:focus,
.checklist-section input[type="email"]:focus,
.checklist-section input[type="url"]:focus,
.checklist-section input[type="number"]:focus,
.checklist-section select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.todo-create-card .form-control,
.todo-create-card .form-select {
    border-color: #9B0026;
}

.todo-create-card .form-control:focus,
.todo-create-card .form-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.todo-filter-card .form-select {
    border-color: #9B0026;
}

.todo-filter-card .form-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.todo-filter-select {
    border-color: #9B0026;
}

.todo-filter-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

.form-control,
.form-select {
    border-color: #9B0026;
}

.form-control:focus,
.form-select:focus {
    border-color: #F70743;
    box-shadow: 0 0 0 0.2rem rgba(155, 0, 38, 0.15);
}

/* Buttons */

.btn-primary,
.btn-primary:focus,
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
    background-color: #9B0026 !important;
    border-color: #9B0026 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #F70743 !important;
    border-color: #F70743 !important;
}

.btn-outline-primary {
    --bs-btn-color: #9B0026 !important;
    --bs-btn-border-color: #9B0026 !important;
    --bs-btn-hover-color: #fff !important;
    --bs-btn-hover-bg: #9B0026 !important;
    --bs-btn-hover-border-color: #9B0026 !important;
    --bs-btn-active-color: #fff !important;
    --bs-btn-active-bg: #9B0026 !important;
    --bs-btn-active-border-color: #9B0026 !important;
}

.form-check-input:checked {
    background-color: #9B0026 !important;
    border-color: #9B0026 !important;
}

.form-check-input:focus {
    border-color: #F70743 !important;
    box-shadow: 0 0 0 0.25rem rgba(247, 7, 67, 0.25) !important;
}

.alert-heading .bi-info-circle {
    color: #9B0026 !important;
}

.alert-heading {
    color: #9B0026 !important;
}

/* ==========================================================================
   5. Druck-Layout
   ========================================================================== */

@media print {
    header,
    footer,
    .no-print,
    .admin-overview,
    .btn {
        display: none !important;
    }

    main {
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .checklist-container,
    body .checklist-container {
        max-width: none !important;
        width: 100% !important;
    }

    .checklist-section,
    .sub-block,
    body .checklist-section,
    body .sub-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        background: #fff !important;
    }
}
