/* Primary-Button global gr�n erzwingen */
.btn-primary {
    color: #fff;
    background-color: #005428;
    border-color: #005428;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary:active:focus {
        background-color: #003e20;
        border-color: #003e20;
    }
/* Outlines passend */
.btn-outline-primary {
    color: #005428;
    border-color: #005428;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus {
        color: #fff;
        background-color: #005428;
        border-color: #005428;
    }

/* Links & Pagination in Brand-Farbe */
a.link-primary, .page-link, .nav-link, .dropdown-item.active, .dropdown-item:active {
    --bs-link-color: #005428;
}

.page-item.active .page-link {
    background-color: #005428;
    border-color: #005428;
}

/* Optional: Badges */
.badge.bg-primary {
    background-color: #005428 !important;
}



/* Akzent-Button: funktioniert unabh�ngig von der BS-Version */
.btn-accent {
    color: #fff;
    background-color: #95b900; /* <� direkt setzen */
    border-color: #95b900; /* <� direkt setzen */
}

    .btn-accent:hover,
    .btn-accent:focus {
        color: #fff;
        background-color: #7a9300;
        border-color: #7a9300;
    }

    .btn-accent:active,
    .btn-accent:active:focus {
        color: #fff;
        background-color: #6a8300;
        border-color: #6a8300;
    }


/* Profil-Icon und Glocke dunkelgr�n */
.navbar .bi-person-circle,
.navbar .bi-bell {
    color: #005428; /* dein Dunkelgr�n */
}

.navbar .nav-link:hover .bi-person-circle,
.navbar .nav-link:hover .bi-bell,
.navbar .nav-link:hover span {
    color: #003e20; /* dunklere Variante f�r Hover */
}

.navbar .nav-link {
    color: #005428 !important;
}

/* site.css Erg�nzung */
.card-header {
    background: #f8f9fa;
}

legend {
    margin-bottom: .75rem;
}


.help-modal-wide .modal-dialog {
    max-width: 900px;
}

.screenshot-small {
    max-width: 200px;
    max-height: 120px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.screenshot-large {
    max-width: 100%;
    max-height: 80vh;
    cursor: zoom-out;
}

/* Role permission selector */
.permission-editor {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-body-bg);
}

.permission-editor__intro {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.permission-editor__intro-icon,
.permission-group__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #005428;
    background: rgba(0, 84, 40, .1);
}

.permission-editor__intro-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .625rem;
    font-size: 1.2rem;
}

.permission-editor__groups {
    padding: 1.25rem;
}

.permission-group {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .625rem;
    background: var(--bs-body-bg);
}

.permission-group__title {
    display: flex;
    float: none;
    width: auto;
    align-items: center;
    gap: .625rem;
    margin: 0 0 .875rem;
    padding: 0;
    color: var(--bs-body-color);
    font-size: 1rem;
    font-weight: 600;
}

.permission-group__icon {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    font-size: .95rem;
}

.permission-option {
    position: relative;
    display: flex;
    min-height: 4.25rem;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 2.5rem .75rem .875rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.permission-option:hover {
    border-color: rgba(0, 84, 40, .45);
    background: rgba(0, 84, 40, .025);
}

.permission-option:focus-within {
    border-color: #005428;
    box-shadow: 0 0 0 .2rem rgba(0, 84, 40, .14);
}

.permission-option:has(.permission-option__check:checked) {
    border-color: #005428;
    background: rgba(0, 84, 40, .055);
}

.permission-option__check {
    flex: 0 0 auto;
    margin-top: .2rem;
}

.permission-option__check:checked {
    border-color: #005428;
    background-color: #005428;
}

.permission-option__content {
    display: block;
    min-width: 0;
}

.permission-option__key {
    display: inline-block;
    margin-bottom: .25rem;
    padding: .15rem .4rem;
    border-radius: .25rem;
    color: var(--bs-body-color);
    background: var(--bs-secondary-bg);
    font-size: .78rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.permission-option__description {
    display: block;
    color: var(--bs-secondary-color);
    font-size: .875rem;
    line-height: 1.35;
}

.permission-option__selected-icon {
    position: absolute;
    top: .85rem;
    right: .875rem;
    display: none;
    color: #005428;
    font-size: 1rem;
}

.permission-option:has(.permission-option__check:checked) .permission-option__selected-icon {
    display: block;
}

@media (max-width: 575.98px) {
    .permission-editor__intro,
    .permission-editor__groups {
        padding: 1rem;
    }
}

/* Roles index: status/type badges (readable on all row states) */
.roles-index-badge {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4em 0.65em;
}

.roles-index-badge--active {
    color: #fff;
    background-color: #198754;
    border: 1px solid #198754;
}

.roles-index-badge--inactive {
    color: #fff;
    background-color: #6c757d;
    border: 1px solid #6c757d;
}

.roles-index-badge--system {
    color: #fff;
    background-color: #212529;
    border: 1px solid #212529;
}

.roles-index-badge--custom {
    color: #005428;
    background-color: #fff;
    border: 1px solid rgba(0, 84, 40, 0.45);
}

/* POS article category tree */
.pos-cat-toggle {
    width: 1.25rem;
    min-width: 1.25rem;
    line-height: 1;
    color: inherit;
}

.pos-cat-toggle:hover,
.pos-cat-toggle:focus {
    color: var(--bs-primary, #0d6efd);
}

.pos-cat-toggle-spacer {
    display: inline-block;
    width: 1.25rem;
    min-width: 1.25rem;
}

.pos-cat-toggle-icon {
    font-size: 0.85rem;
    vertical-align: -0.1em;
}

.pos-cat-name {
    min-width: 12rem;
}

.secondary-nav {
    background-color: #f8f9fa;
}

.secondary-nav__list {
    gap: 0.25rem;
}

.secondary-nav .nav-link {
    color: #005428;
    white-space: nowrap;
    padding: 0.65rem 0.85rem;
}

.secondary-nav .nav-link:hover,
.secondary-nav .nav-link:focus {
    color: #003e20;
}

.secondary-nav .nav-link.active {
    color: #003e20;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #005428;
}

.secondary-nav .dropdown-toggle::after {
    margin-left: auto;
}

.secondary-nav .dropdown-item.active,
.secondary-nav .dropdown-item:active {
    color: #fff;
    background-color: #005428;
}

/* ----- Phase 1: page chrome + tables ----- */
.cs-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.cs-page-header > * {
    min-width: 0;
}

.cs-page-header h1,
.cs-page-header .h1,
.cs-page-header .h3 {
    margin-bottom: 0;
}

/* ----- Phase 2: control sizing (font-size / overflow only; no color changes) -----
   Page title = Bootstrap .h3 (1.75rem), not raw h1 (2.5rem).
   Header actions wrap; flex children can shrink so 100% zoom does not force page-level overflow.
*/
.cs-page-header h1,
.cs-page-header .h1 {
    font-size: calc(1.3rem + 0.6vw);
    font-weight: 500;
    line-height: 1.2;
}

@media (min-width: 1200px) {
    .cs-page-header h1,
    .cs-page-header .h1 {
        font-size: 1.75rem;
    }
}

.cs-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* Page content inset — title, toolbar, labels, forms, and tables share the same rail */
.cs-content-inset {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    min-width: 0;
}

@media (min-width: 768px) {
    .cs-content-inset {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .cs-content-inset {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.cs-table-card {
    overflow: hidden;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
}

.cs-table-wrap,
.cs-table-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cs-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #003e20;
    background-color: #f3f6f4;
    border-bottom-width: 1px;
    white-space: nowrap;
    vertical-align: middle;
}

.cs-table tbody td {
    vertical-align: middle;
}

.cs-table.table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 84, 40, 0.04);
}

.cs-table .cs-table-actions,
.cs-table td.text-nowrap.text-end,
.cs-table th.text-end:last-child,
.cs-table td.text-end:last-child {
    white-space: nowrap;
}

.cs-deputy-card {
    overflow: hidden;
}

.cs-deputy-count {
    background-color: #005428;
    color: #fff;
    min-width: 1.75rem;
    font-weight: 600;
}

.cs-deputy-table-panel {
    border-top: 1px solid #c5d6cb;
    background: #fff;
}

.cs-deputy-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1.15rem;
    background: #f3f6f4;
    border-bottom: 1px solid #d7e3db;
}

.cs-deputy-table-heading {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #003e20;
}

.cs-deputy-table thead th {
    padding: 0.8rem 1.15rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cs-deputy-table tbody td {
    padding: 0.95rem 1.15rem;
    border-color: #e6eee9;
}

.cs-deputy-table tbody tr:nth-child(even) > * {
    background-color: #f7faf8;
}

.cs-deputy-table.table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 84, 40, 0.07);
}

.cs-deputy-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #123024;
    line-height: 1.25;
}

.cs-deputy-id {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    background: #e8f2ec;
    color: #005428;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cs-deputy-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #3d5348;
    text-decoration: none;
}

.cs-deputy-email:hover {
    color: #005428;
    text-decoration: underline;
}

.cs-deputy-email i {
    color: #005428;
}

.cs-deputy-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    background: #005428;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c5d6cb;
}

.cs-deputy-remove {
    font-weight: 600;
}

.cs-deputy-empty {
    color: #5b6b61;
    padding: 1.75rem 0.75rem;
}

.cs-deputy-empty i {
    display: block;
    font-size: 2rem;
    color: #005428;
    margin-bottom: 0.4rem;
}

/* Navbar: keep actions on one row on small screens */
.cs-topbar {
    flex-wrap: nowrap;
    min-width: 0;
}

.cs-topbar .navbar-brand {
    min-width: 0;
    margin-right: 0.5rem;
}

.cs-topbar-actions {
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

.cs-topbar-username {
    display: inline-block;
    max-width: 8rem;
    vertical-align: bottom;
}

@media (max-width: 575.98px) {
    .cs-topbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .cs-topbar-actions {
        gap: 0.15rem !important;
    }

    .cs-topbar-username {
        max-width: 4.5rem;
    }

    .cs-topbar .btn-accent {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}

/* Collapsed left menu: icon rail when the offcanvas is hidden */
:root {
    --cs-mini-nav-width: 3.5rem;
}

.cs-mini-nav {
    display: none;
}

.cs-deputy-banner {
    background: #7A9300;
    color: #fff;
    font-weight: 600;
}

.cs-deputy-expiry {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.92;
}

.cs-deputy-exit {
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.25rem 0.75rem;
}

.cs-deputy-exit:hover,
.cs-deputy-exit:focus {
    background: #fff;
    border-color: #fff;
    color: #5c7000;
}

.cs-deputy-exit:active,
.cs-deputy-exit:active:focus {
    background: #f3f5e8;
    border-color: #fff;
    color: #4a5a00;
}

@media (min-width: 768px) {
    body.cs-has-mini-nav {
        padding-left: var(--cs-mini-nav-width);
    }

    body.cs-has-mini-nav > header {
        position: relative;
        z-index: 1030;
        margin-left: calc(-1 * var(--cs-mini-nav-width));
        width: calc(100% + var(--cs-mini-nav-width));
        background-color: #fff;
    }

    .cs-mini-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--cs-mini-nav-width);
        padding: 3.75rem 0 0.5rem;
        z-index: 1025;
        background: #fff;
        border-right: 1px solid #e5e5e5;
        overflow: hidden;
    }
}

body:has(#mainOffcanvas.show) .cs-mini-nav,
body:has(#mainOffcanvas.showing) .cs-mini-nav {
    visibility: hidden;
    pointer-events: none;
}

.cs-mini-nav__items {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.25rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 84, 40, 0.35) transparent;
}

.cs-mini-nav__items::-webkit-scrollbar {
    width: 4px;
}

.cs-mini-nav__items::-webkit-scrollbar-thumb {
    background: rgba(0, 84, 40, 0.35);
    border-radius: 4px;
}

.cs-mini-nav__divider {
    height: 1px;
    margin: 0.4rem 0.85rem;
    background: #e5e5e5;
}

.cs-mini-nav__item-wrap {
    position: relative;
}

.cs-mini-nav__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.75rem;
    color: #005428;
    text-decoration: none;
}

.cs-mini-nav__item:hover,
.cs-mini-nav__item:focus-visible,
.cs-mini-nav__item-wrap:hover .cs-mini-nav__item,
.cs-mini-nav__item-wrap.active .cs-mini-nav__item {
    color: #003e20;
    background: rgba(0, 84, 40, 0.08);
}

.cs-mini-nav__item:focus-visible {
    outline: 2px solid #005428;
    outline-offset: -2px;
}

.cs-mini-nav__item-wrap.active .cs-mini-nav__item {
    box-shadow: inset 3px 0 0 #005428;
}

.cs-mini-nav__item .bi {
    font-size: 1.2rem;
    line-height: 1;
}

.cs-mini-nav__flyout {
    position: fixed;
    left: var(--cs-mini-nav-width);
    top: 0;
    z-index: 1050;
    min-width: 11rem;
    max-width: 18rem;
    padding: 0.45rem 0;
    color: #212529;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0 0.5rem 0.5rem 0;
    box-shadow: 0.35rem 0.35rem 1rem rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-0.25rem);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.cs-mini-nav__item-wrap:hover .cs-mini-nav__flyout,
.cs-mini-nav__item-wrap:focus-within .cs-mini-nav__flyout {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.cs-mini-nav__title {
    padding: 0.2rem 0.85rem;
    color: #003e20;
    font-weight: 600;
    white-space: nowrap;
}

.cs-mini-nav__children {
    display: flex;
    flex-direction: column;
    padding-top: 0.2rem;
    margin-top: 0.2rem;
    border-top: 1px solid #f0f0f0;
}

.cs-mini-nav__child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
}

.cs-mini-nav__child:hover,
.cs-mini-nav__child:focus-visible {
    color: #003e20;
    background: rgba(0, 84, 40, 0.08);
}

.cs-mini-nav__child.active {
    color: #003e20;
    font-weight: 600;
}

.cs-mini-nav__child .bi {
    color: #005428;
}

@media (prefers-reduced-motion: reduce) {
    .cs-mini-nav__flyout {
        transition: none;
    }
}

.vh-offer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.vh-offer-card {
    min-width: 16rem;
    max-width: 22rem;
    flex: 1 1 16rem;
}

.vh-slot-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vh-slot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
}

.vh-slot-min {
    background: #d1e7dd;
}

.vh-own-slot {
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1;
}

.btn.cs-choice-toggle-label {
    color: #495057;
    background-color: #fff;
    border-color: #ced4da;
    border-radius: 999px;
}

.btn.cs-choice-toggle-label:hover,
.btn.cs-choice-toggle-label:focus {
    color: #005428;
    background-color: #fff;
    border-color: #005428;
}

.btn-check.cs-choice-toggle:checked + .btn.cs-choice-toggle-label,
.btn-check.cs-choice-toggle:active + .btn.cs-choice-toggle-label,
.btn.cs-choice-toggle-label:active {
    color: #fff;
    background-color: #005428;
    border-color: #005428;
    box-shadow: none;
}

.btn-check.cs-choice-toggle:focus + .btn.cs-choice-toggle-label,
.btn-check.cs-choice-toggle:checked:focus + .btn.cs-choice-toggle-label {
    box-shadow: 0 0 0 0.2rem rgba(0, 84, 40, 0.25);
}

.cs-choice-toggle-label .cs-choice-toggle-on {
    display: none;
}

.btn-check.cs-choice-toggle:checked + .cs-choice-toggle-label .cs-choice-toggle-on {
    display: inline-block;
}

.btn-check.cs-choice-toggle:checked + .cs-choice-toggle-label .cs-choice-toggle-off {
    display: none;
}




