/* Roboto (lokal gehostet statt Google-Fonts-CDN) — Variable Font, gesamte Gewichtsachse */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/roboto/Roboto-Variable.ttf') format('truetype-variations');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/roboto/Roboto-Italic-Variable.ttf') format('truetype-variations');
}

:root {
    --bs-body-bg: #ffffff;
    --primary: #D52439;
    --primary-hover: #B01E30;
}

body {
    font-family: 'Roboto', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* WCAG 2.1 AA contrast fixes */
.login-card-body {
    color: #212529;
}
.login-card-body a.text-center {
    color: #495057;
}
.login-card-body a.text-center:hover {
    color: var(--primary);
}
.btn-outline-secondary {
    color: #495057;
    border-color: #495057;
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: #495057;
    border-color: #495057;
}
.content-wrapper {
    color: #212529;
}

.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}
.skip-to-content:focus-visible {
    position: fixed;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.notifications {
    position: absolute;
    z-index: 100;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    .notification {
        display: block;
        margin-bottom: 2px;
        animation: hideAfterDelay 0s ease-in 3s forwards;
    }
    .notification-error {
        display: block;
        margin-bottom: 2px;
        animation: hideAfterDelay 0s ease-in 10s forwards;
    }
}

@keyframes hideAfterDelay {
    to {
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
        border: none;
        background-color: initial;
        overflow: hidden;
    }
}

.notification-btn {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: transparent;
    display: block;
    padding: 4px 12px;
    margin-bottom: 5px;
    color: var(--bs-btn-color);
    text-align: center;
    vertical-align: middle;
    border: var(--bs-border-width) solid var(--bs-btn-border-color);
    border-radius: var(--bs-border-radius);
    background-color: transparent;
    &.notification-btn-success {
        --bs-btn-color: #198754;
        --bs-btn-border-color: #198754;
    }
    &.notification-btn-danger {
        --bs-btn-color: #dc3545;
        --bs-btn-border-color: #dc3545;
    }
    &.notification-btn-warning {
        --bs-btn-color: #ffc107;
        --bs-btn-border-color: #ffc107;
    }
    &.notification-btn-info {
        --bs-btn-color: #0dcaf0;
        --bs-btn-border-color: #0dcaf0;
    }
    &.notification-success {
        color: #0a3622;
        background-color: #d1e7dd;
        border: 1px solid #a3cfbb;
    }
    &.notification-danger {
        color: #58151c;
        background-color: #f8d7da;
        border: 1px solid #58151c;
    }
    &.notification-warning {
        color: var(--bs-warning-text-emphasis);
        background-color: var(--bs-warning-bg-subtle);
        border: var(--bs-border-width) solid var(--bs-warning-border-subtle);
    }
    &.notification-info {
        color: var(--bs-info-text-emphasis);
        background-color: var(--bs-info-bg-subtle);
        border: var(--bs-border-width) solid var(--bs-info-border-subtle);
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 15px) !important;
    overflow: visible;
    padding-bottom: 0;
}

.sidebar nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.sidebar .user-panel {
    margin-top: auto;
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
    flex-shrink: 0;
    flex-grow: 0;
}

.logout-btn {
    background-color: transparent;
    border: none;
    color: #fff;
    text-align: left;
    padding: .5rem 1rem .5rem 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    &:hover {
        background-color: rgba(255,255,255,.1);
        color: #fff;
    }
    p {
        margin: 0;
        margin-left: 0.5rem;
    }
}

.main-sidebar {
    padding-bottom: 0;
}

.sidebar-collapse .sidebar .logout-btn p {
    display: none;
}

.sidebar-collapse .sidebar:hover .logout-btn p {
    display: block;
}

.sidebar-collapse .logout-btn {
    justify-content: center;
}

.sidebar-collapse .sidebar:hover .logout-btn {
    justify-content: flex-start;
}

select.form-control {
    -webkit-transition: none;
    transition: none;
}

.btn {
    &.btnCustom {
        background-color: #fff;
        color: #000;
        border-radius: unset;
    }
}

.zeroPedding {
    padding: 0;
}

/*dont work because login form is exploding..*/
.input-group-text {
    border-radius: unset;
    border: unset;
    width: 100%;
}

.input-group-input-field {
    border-radius: unset;
    border: unset;
    width: 100%;
}

.input-group-select {
    border: 1px solid #ced4da;
    .input-group-append {
        border-left: 2px solid #ced4da;
    }
}

.input-btn-trash {
    color: red;
    cursor: pointer;
}

.input-btn-clone {
    cursor: pointer;
    margin-right: 0.5rem;
}

.btn {
    &.btn-primary {
        background-color: var(--primary) !important;
        border-color: var(--primary) !important;
    }
    &.btn-primary:hover,
    &.btn-primary:focus,
    &.btn-primary.focus,
    &.btn-primary:active,
    &.btn-primary.active,
    &.show > &.btn-primary.dropdown-toggle {
        background-color: var(--primary-hover) !important;
        border-color: var(--primary-hover) !important;
    }

    &.reset {
        padding-left: 8px;
        padding-right: 10px;
        width: 32px;
    }
    &.btn-tool {
        color: var(--primary);
        &:hover {
            color: var(--primary-hover);
        }
    }

}
.invisible {
    visibility: hidden;
}
.olympia-apotheke-line-spacer {
    height: 8px;
}

.oa-paginator {
    .oa-disabled {
        text-decoration: none;
        pointer-events: none;
        cursor: default;
        opacity: 0.2;
    }
}

.page-item {
    .page-link {
        color: var(--primary);
        &.oa-active {
            color: var(--primary-hover);
            font-weight: bold;    
        }
    }
}

.oa-bold {
    font-weight: 700;
}

.card-footer {
    .result-limit {
        color: var(--primary);
    }
}

.oa-create {
    width: 100%;
    h2 {
        font-size: 1.7rem;
        padding-left: 10px;
        padding-top: 10px;
    }
}

.oa-edit {
    width: 100%;
    h2 {
        font-size: 1.7rem;
        padding-left: 10px;
        padding-top: 10px;
    }
}

textarea {
    resize: none;
}

.card-title {
    font-size: 1.7rem !important;
}

.input-group-lg {
    input{
        height: 40px;
        padding-left: 12px;
        background-color: #fcfcfc;
    }
}

table {
    th {
        max-width: 0%;
        height: 28px;
        white-space: nowrap;
        color: #000;
        background-color: rgba(0, 0, 0, 0.03);
        &.orderable {
            white-space: nowrap;
            a:visited, a:link {
                color: inherit;
                border-bottom: 1px outset #fff;
            }
        }
    }
    .nowrap {
        white-space: nowrap;
        max-width: 0%;
    }
    tr {
        a {
            color: var(--primary);
            &:hover {
                color: var(--primary-hover);
            }
        }
    }
}

.pointer {
    cursor: pointer;
}

#content {
    width: 100%;
}

.modal-content {
    box-shadow: unset;
    border: none;
}

.hrdivider {
  position: relative;
  margin-top: 5px;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid darkgray;
}

.hrdivider span {
  position: absolute;
  top: 5px;
  background: #fff;
  padding: 0 20px;
  font-weight: bold;
  font-size: 16px;
}

.nav-link {
    &.submenu {
        padding-left: 40px;
    }
}

.form-select {
    --bs-form-select-bg-img: 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 5 6 6 6-6'/%3e%3c/svg%3e");
    display: block;
    width: 100%;
    padding: .25rem 2rem .25rem .5rem;
    appearance: none;
    color: #333;
    background-color: #fcfcfc;
    background-image: var(--bs-form-select-bg-img),var(--bs-form-select-bg-icon,none);
    background-repeat: no-repeat;
    background-position: right .5rem center;
    background-size: 16px 12px;
    border: unset;
    height: 40px;
    &:disabled {
        background-color: #f2f2f2;
    }
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid #ced4da;

    .form-select {
        flex: 1;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        padding-left: .75em;
    }

    .input-group-append {
        display: flex;
        margin-left: -1px;

        .btn {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            border: 1px solid #ced4da;
            height: 40px;
            min-width: 40px;
            padding: 0 12px;
            font-size: 18px;
            line-height: 1;
            border-top-width: 0;
            border-bottom-width: 0;
            border-right-width: 0;
        }
    }

    .form-control {
        border: unset;
    }
}

.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,
.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active {
  background-color: var(--primary-hover);
}

/* Fix for nav-treeview collapse - ensure submenu is hidden when parent is not open */
.nav-sidebar > .nav-item:not(.menu-open) > .nav-treeview {
    display: none;
}

.nav-sidebar > .nav-item.menu-open > .nav-treeview {
    display: block;
}

/* HTMX Stepper styles */
.stepper {
    background-color: #fff;
    border-radius: 0.25rem;
    width: 100%;
}

.stepper-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.stepper-step {
    display: flex;
    align-items: center;
}

.stepper-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stepper-trigger:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.25rem;
}

.stepper-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stepper-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #6c757d;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.stepper-step.active .stepper-circle {
    background-color: var(--primary, #D52439);
    transform: scale(1.1);
}

.stepper-step.completed .stepper-circle {
    background-color: #28a745;
}

.stepper-label {
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap;
}

.stepper-step.active .stepper-label {
    color: var(--primary, #D52439);
    font-weight: 600;
}

.stepper-step.completed .stepper-label {
    color: #28a745;
}

.stepper-line {
    flex: 1;
    height: 2px;
    min-width: 2rem;
    margin: 0 0.5rem;
    background-color: #dee2e6;
    transition: background-color 0.2s ease;
}

.stepper-step.completed + .stepper-line,
.stepper-line:has(+ .stepper-step.completed),
.stepper-step.completed ~ .stepper-line:not(:has(~ .stepper-step:not(.completed))) {
    background-color: #28a745;
}

.stepper-body {
    padding: 1rem 0;
}

.stepper-content {
    animation: stepperFadeIn 0.2s ease;
}

@keyframes stepperFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stepper-navigation {
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.stepper-buttons-left,
.stepper-buttons-right {
    display: flex;
    gap: 10px;
}

/* Button icon spacing */
.stepper-buttons-left .btn i,
.stepper-buttons-right .btn i,
.stepper-navigation .btn i {
    margin-left: 8px;
    margin-right: 8px;
}

.stepper-buttons-left .btn i:first-child,
.stepper-buttons-right .btn i:first-child,
.stepper-navigation .btn i:first-child {
    margin-left: 0;
}

.stepper-buttons-left .btn i:last-child,
.stepper-buttons-right .btn i:last-child,
.stepper-navigation .btn i:last-child {
    margin-right: 0;
}

/* ==========================================================================
   Responsive: Stepper
   ========================================================================== */
/* Tablet: compact horizontal stepper */
@media screen and (max-width: 991.98px) {
    .stepper-trigger {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    .stepper-circle {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    .stepper-line {
        min-width: 1rem;
    }
}

/* Mobile: vertical stepper + stacked buttons */
@media screen and (max-width: 767.98px) {
    .stepper-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    .stepper-line {
        width: 2px;
        height: 1.5rem;
        min-width: unset;
        margin: 0;
    }
    .stepper-trigger {
        width: 100%;
        justify-content: flex-start;
    }
    .stepper-body {
        padding: 0.5rem 0;
    }
    .stepper-navigation {
        position: sticky;
        bottom: 0;
        background-color: #fff;
        padding: 0.75rem 0;
        border-top: 1px solid #dee2e6;
        z-index: 10;
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .stepper-buttons-left,
    .stepper-buttons-right {
        width: 100%;
    }
    .stepper-buttons-left .btn,
    .stepper-buttons-right .btn {
        width: 100%;
        min-height: 44px;
    }
}

/* Signature canvas responsive */
.stepper .signature-pad-container,
.stepper canvas {
    max-width: 100%;
}

/* ==========================================================================
   Responsive: Repeater
   ========================================================================== */
@media screen and (max-width: 767.98px) {
    /* Stack repeater card fields to single-column */
    .repeater-row .card-body .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* Visual row separators: alternating background + CSS counter row numbers */
    .repeater-wrapper {
        counter-reset: repeater-row;
    }
    .repeater-row {
        counter-increment: repeater-row;
    }
    .repeater-row:nth-child(even) .card {
        background-color: rgba(0, 0, 0, 0.02);
    }
    .repeater-row .card-title::before {
        content: counter(repeater-row) ". ";
    }
    /* Full-width add/remove buttons with adequate tap targets */
    .repeater-row .input-btn-trash,
    .repeater-row .input-btn-clone {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    [data-repeater-add] {
        width: 100%;
        min-height: 44px;
    }
    /* Prevent text overflow with long product names */
    .repeater-row .card-body label,
    .repeater-row .card-body .ts-control .item {
        word-break: break-word;
    }
}

/* ==========================================================================
   Responsive: Content Area & Touch
   ========================================================================== */
@media screen and (max-width: 991.98px) {
    /* Touch feedback: enhanced active state for buttons */
    .btn:active {
        transform: scale(0.97);
        opacity: 0.85;
    }
    /* WCAG 2.5.5: minimum touch target size */
    .btn {
        min-height: 44px;
    }
}
@media screen and (max-width: 767.98px) {
    /* Responsive content padding */
    .content-wrapper {
        padding: 0 2px !important;
    }
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ========================================
   Document Upload Styles
   ======================================== */

.upload-dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #f8f9fa;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background-color: rgba(213, 36, 57, 0.05);
}

.upload-dropzone.dragover {
    transform: scale(1.01);
}

.upload-dropzone-content {
    pointer-events: none;
}

.upload-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-dropzone {
    position: relative;
}

/* File List */
.upload-file-list {
    max-height: 300px;
    overflow-y: auto;
}

.upload-file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background-color: #fff;
}

.upload-file-item.uploading {
    background-color: #f8f9fa;
}

.upload-file-item.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.upload-file-item .file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #6c757d;
}

.upload-file-item .file-icon.pdf { color: #dc3545; }
.upload-file-item .file-icon.image { color: #198754; }
.upload-file-item .file-icon.doc { color: #0d6efd; }

.upload-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-item .file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-item .file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.upload-file-item .file-actions {
    margin-left: 1rem;
}

.upload-file-item .btn-delete {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Progress Bar */
.upload-progress {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-progress-bar {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.1s ease;
}

/* Nav Tabs for Order */
.nav-tabs .nav-link {
    color: #495057;
    border: 1px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   WCAG 2.1 AA — Color Contrast Overrides
   ======================================== */

/* Focus indicators: ensure visible outline on all interactive elements */
:focus {
    outline: 2px solid var(--primary, #D52439);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}
:focus-visible {
    outline: 2px solid var(--primary, #D52439);
    outline-offset: 2px;
}

/* Notification button text contrast fixes (old: #ffc107 → 1.9:1, #0dcaf0 → 2.4:1) */
.notification-btn.notification-btn-warning {
    --bs-btn-color: #8a6d00;       /* 4.5:1 on white */
    --bs-btn-border-color: #8a6d00;
}
.notification-btn.notification-btn-info {
    --bs-btn-color: #087990;       /* 4.7:1 on white */
    --bs-btn-border-color: #087990;
}

/* Badge contrast fixes — AdminLTE/Bootstrap defaults may fail AA */
.badge.bg-info,
.badge.badge-info {
    background-color: #087990 !important;  /* 4.7:1 with white text */
}
.badge.bg-warning,
.badge.badge-warning {
    color: #000 !important;                /* 12.9:1 on #ffc107 */
}

/* Stepper inactive label: improve from #6c757d (4.3:1 on #f8f9fa) */
.stepper-label {
    color: #565e64;                /* 5.4:1 on #f8f9fa */
}
.stepper-step.active .stepper-label {
    color: var(--primary, #D52439);
}
.stepper-step.completed .stepper-label {
    color: #146c2e;                /* 5.7:1 on #f8f9fa */
}

/* ========================================
   Form Field Layout
   ======================================== */

/* Required field asterisk indicator */
.required-asterisk {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.1em;
    position:absolute;
}

/* Half-width form fields via span() builder method.
   .row > selector gives specificity 0,2,0 to reliably override
   Bootstrap's .col-md-12 (0,1,0) regardless of CSS load order. */
.row > .j-input-span {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
}

@media (max-width: 767.98px) {
    .row > .j-input-span {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* Third-width form fields via third() builder method.
   .row > selector gives specificity 0,2,0 to reliably override
   Bootstrap's .col-md-12 (0,1,0) regardless of CSS load order. */
.row > .j-input-third {
    flex: 0 0 33.333%;
    width: 33.333%;
    max-width: 33.333%;
    padding-right: 2.5rem;
}

/* Tablet (md): step down to 2 columns before collapsing to 1,
   mirroring Bootstrap's md/lg cascade so input-group-lg fields
   stay usable in the 768–991px range. Ordered before the <768
   rule so the 100% override wins at equal specificity. */
@media (max-width: 991.98px) {
    .row > .j-input-third {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .row > .j-input-third {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* TomSelect disabled/locked state */
.ts-wrapper.disabled,
.ts-wrapper.locked {
    opacity: 0.65;
    pointer-events: none;
}

.ts-wrapper.disabled .item .clear,
.ts-wrapper.locked .item .clear {
    display: none !important;
}

/* ==========================================================================
   Responsive: TomSelect & Dropzone Touch
   ========================================================================== */
@media screen and (max-width: 991.98px) {
    /* TomSelect: increase tap targets for touch */
    .ts-dropdown .option {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem 0.75rem;
    }
    /* TomSelect: constrain dropdown height and contain scroll */
    .ts-dropdown .ts-dropdown-content {
        max-height: 50vh;
        overscroll-behavior: contain;
    }
    /* Dropzone: full-width with adequate tap target */
    .upload-dropzone {
        width: 100%;
        min-height: 120px;
    }
}

/* ==========================================================================
   Responsive: Forms
   ========================================================================== */
@media screen and (max-width: 767.98px) {
    .required-asterisk,
    .form-group label,
    .card-body label {
        word-break: break-word;
    }
}

/* ==========================================================================
   Responsive: Modals
   ========================================================================== */
@media screen and (max-width: 575.98px) {
    .modal-dialog {
        width: 100vw;
        max-width: 100%;
        margin: 0;
    }
    .modal-dialog .modal-content {
        border-radius: 0;
    }
}

/* ==========================================================================
   Navbar User Info
   ========================================================================== */
.navbar-user-info {
    max-width: 200px;
    text-align: right;
    line-height: 1.2;
}
.navbar-user-info .navbar-user-label {
    font-size: 0.7rem;
    line-height: 1.1;
}
.navbar-user-info .navbar-user-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.875rem;
}
.navbar-user-info .navbar-user-practice {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    line-height: 1.1;
}

/* ==========================================================================
   Responsive: Sidebar
   ========================================================================== */
/* Flicker prevention: ensure sidebar is hidden before AdminLTE JS loads */
@media screen and (max-width: 991.98px) {
    body:not(.sidebar-open) .main-sidebar {
        margin-left: -250px !important;
    }
}

/* ==========================================================================
   Responsive: Tables
   ========================================================================== */
@media (max-width: 991.98px) {
    .table-responsive table {
        min-width: 600px;
    }
}

/* ==========================================================================
   QuickSupport Widget
   ========================================================================== */

[x-cloak] {
    display: none !important;
}

.navbar-light .navbar-nav .nav-link.quick-support-nav-link {
    color: var(--primary);
}

.navbar-light .navbar-nav .nav-link.quick-support-nav-link:hover,
.navbar-light .navbar-nav .nav-link.quick-support-nav-link:focus {
    color: var(--primary-hover);
}

.quick-support-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1054;
    cursor: pointer;
}

.quick-support-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    background: #fff;
    z-index: 1055;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quick-support-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: var(--primary);
    color: #fff;
    flex-shrink: 0;
}

.quick-support-sidebar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.quick-support-sidebar-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    line-height: 1;
    transition: background-color 0.15s ease;
}

.quick-support-sidebar-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.quick-support-sidebar-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.quick-support-sidebar-body {
    padding: 1.25rem;
    flex: 1;
    overflow-y: auto;
}

.quick-support-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.quick-support-contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.quick-support-contact-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Slide-in/out transitions */
.qs-enter, .qs-leave {
    transition: transform 0.3s ease;
}
.qs-enter-start, .qs-leave-end {
    transform: translateX(100%);
}
.qs-enter-end, .qs-leave-start {
    transform: translateX(0);
}

@media screen and (max-width: 575.98px) {
    .quick-support-sidebar {
        width: 100vw;
    }
}

label:not(.form-check-label):not(.custom-file-label) {
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 4%;
    font-size: 0.95rem;
    margin: .75rem 0 0 0;
}

.card-body {
    label::before {
        content: "\00BB";
        margin-right: 0.25em;
    }
    button[type="submit"] {
        margin-top: 1.5rem;
    }

    .ts-control {
        background-color: #fcfcfc;
    }

    .input-group {
        textarea {
            background-color: #fcfcfc;
            padding-left: .75rem;
        }
    }
}