/* Example customizations for SweetAlert2 dark and light modes */
body[data-bs-theme="dark"] .swal2-popup {
    background: #333;
    color: #fff;
}

body[data-bs-theme="light"] .swal2-popup {
    background: #fff;
    color: #000;
}
.suggestions-list {
    border: 1px solid #494949;
    max-height: 150px;
    overflow-y: auto;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    padding: 8px;
    cursor: pointer;
}

.suggestions-list li:hover {
    background: #f0f0f0;
}

.small-box {
    border-radius: 0.375rem;
    box-shadow: 0 0 1px rgba(var(--bs-body-color-rgb), 0.125), 0 1px 3px rgba(var(--bs-body-color-rgb), 0.2);
    position: relative;
    display: block;
    margin-bottom: 1.25rem;
    --bs-link-color-rgb: none;
    --bs-link-hover-color-rgb: none;
    --bs-heading-color: none;
}
.small-box > .inner {
    padding: 10px;
}
.small-box > .small-box-footer {
    position: relative;
    z-index: 10;
    display: block;
    padding: 3px 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.07);
}
.small-box > .small-box-footer:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
.small-box h3, .small-box .h3 {
    font-size: calc(1.345rem + 1.14vw);
    padding: 0;
    margin: 0 0 10px;
    font-weight: 700;
    white-space: nowrap;
}
@media (min-width: 1200px) {
    .small-box h3, .small-box .h3 {
        font-size: 2.2rem;
    }
}
@media (min-width: 992px) {
    .col-xl-2 .small-box h3, .col-xl-2 .small-box .h3, .col-lg-2 .small-box h3, .col-lg-2 .small-box .h3, .col-md-2 .small-box h3, .col-md-2 .small-box .h3 {
        font-size: calc(1.285rem + 0.42vw);
    }
}
@media (min-width: 992px) and (min-width: 1200px) {
    .col-xl-2 .small-box h3, .col-xl-2 .small-box .h3, .col-lg-2 .small-box h3, .col-lg-2 .small-box .h3, .col-md-2 .small-box h3, .col-md-2 .small-box .h3 {
        font-size: 1.6rem;
    }
}
@media (min-width: 992px) {
    .col-xl-3 .small-box h3, .col-xl-3 .small-box .h3, .col-lg-3 .small-box h3, .col-lg-3 .small-box .h3, .col-md-3 .small-box h3, .col-md-3 .small-box .h3 {
        font-size: calc(1.285rem + 0.42vw);
    }
}
@media (min-width: 992px) and (min-width: 1200px) {
    .col-xl-3 .small-box h3, .col-xl-3 .small-box .h3, .col-lg-3 .small-box h3, .col-lg-3 .small-box .h3, .col-md-3 .small-box h3, .col-md-3 .small-box .h3 {
        font-size: 1.6rem;
    }
}
@media (min-width: 1200px) {
    .col-xl-2 .small-box h3, .col-xl-2 .small-box .h3, .col-lg-2 .small-box h3, .col-lg-2 .small-box .h3, .col-md-2 .small-box h3, .col-md-2 .small-box .h3 {
        font-size: calc(1.345rem + 1.14vw);
    }
}
@media (min-width: 1200px) and (min-width: 1200px) {
    .col-xl-2 .small-box h3, .col-xl-2 .small-box .h3, .col-lg-2 .small-box h3, .col-lg-2 .small-box .h3, .col-md-2 .small-box h3, .col-md-2 .small-box .h3 {
        font-size: 2.2rem;
    }
}
@media (min-width: 1200px) {
    .col-xl-3 .small-box h3, .col-xl-3 .small-box .h3, .col-lg-3 .small-box h3, .col-lg-3 .small-box .h3, .col-md-3 .small-box h3, .col-md-3 .small-box .h3 {
        font-size: calc(1.345rem + 1.14vw);
    }
}
@media (min-width: 1200px) and (min-width: 1200px) {
    .col-xl-3 .small-box h3, .col-xl-3 .small-box .h3, .col-lg-3 .small-box h3, .col-lg-3 .small-box .h3, .col-md-3 .small-box h3, .col-md-3 .small-box .h3 {
        font-size: 2.2rem;
    }
}
.small-box p {
    font-size: 1rem;
}
.small-box p > small, .small-box p > .small {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #f8f9fa;
}
.small-box h3, .small-box .h3,
.small-box p {
    z-index: 5;
}
.small-box .small-box-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 0;
    height: 70px;
    font-size: 70px;
    color: rgba(0, 0, 0, 0.15);
    transition: transform 0.3s linear;
}
@media (prefers-reduced-motion: reduce) {
    .small-box .small-box-icon {
        transition: none;
    }
}
.small-box:hover .small-box-icon {
    transform: scale(1.1);
}

@media (max-width: 575.98px) {
    .small-box {
        text-align: center;
    }
    .small-box .small-box-icon {
        display: none;
    }
    .small-box p {
        font-size: 12px;
    }
}
.info-box {
    box-shadow: 0 0 1px rgba(var(--bs-body-color-rgb), 0.125), 0 1px 3px rgba(var(--bs-body-color-rgb), 0.2);
    border-radius: 0.375rem;
    position: relative;
    display: flex;
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}
.info-box .progress {
    height: 2px;
    margin: 5px 0;
    background-color: rgba(var(--lte-card-variant-color-rgb), 0.125);
}
.info-box .progress .progress-bar {
    background-color: var(--lte-card-variant-color);
}
.info-box .info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    font-size: 1.875rem;
    text-align: center;
    border-radius: 0.375rem;
}
.info-box .info-box-icon > img {
    max-width: 100%;
}
.info-box .info-box-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
    line-height: 1.8;
}
.info-box .info-box-number {
    display: block;
    margin-top: 0.25rem;
    font-weight: 700;
}
.info-box .progress-description,
.info-box .info-box-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.info-box .info-box-more {
    display: block;
}
.info-box .progress-description {
    margin: 0;
}
@media (min-width: 768px) {
    .col-xl-2 .info-box .progress-description, .col-lg-2 .info-box .progress-description, .col-md-2 .info-box .progress-description {
        display: none;
    }
    .col-xl-3 .info-box .progress-description, .col-lg-3 .info-box .progress-description, .col-md-3 .info-box .progress-description {
        display: none;
    }
}
@media (min-width: 992px) {
    .col-xl-2 .info-box .progress-description, .col-lg-2 .info-box .progress-description, .col-md-2 .info-box .progress-description {
        font-size: 0.75rem;
        display: block;
    }
    .col-xl-3 .info-box .progress-description, .col-lg-3 .info-box .progress-description, .col-md-3 .info-box .progress-description {
        font-size: 0.75rem;
        display: block;
    }
}
@media (min-width: 1200px) {
    .col-xl-2 .info-box .progress-description, .col-lg-2 .info-box .progress-description, .col-md-2 .info-box .progress-description {
        font-size: 1rem;
        display: block;
    }
    .col-xl-3 .info-box .progress-description, .col-lg-3 .info-box .progress-description, .col-md-3 .info-box .progress-description {
        font-size: 1rem;
        display: block;
    }
}

.timeline {
    position: relative;
    padding: 0;
    margin: 0 0 45px;
}
.timeline::before {
    border-radius: 0.375rem;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 31px;
    width: 4px;
    margin: 0;
    content: "";
    background-color: var(--bs-border-color);
}
.timeline > div {
    position: relative;
    margin-right: 10px;
    margin-bottom: 15px;
}
.timeline > div::before, .timeline > div::after {
    display: table;
    content: "";
}
.timeline > div > .timeline-item {
    box-shadow: 0 0 1px rgba(var(--bs-body-color-rgb), 0.125), 0 1px 3px rgba(var(--bs-body-color-rgb), 0.2);
    border-radius: 0.375rem;
    position: relative;
    padding: 0;
    margin-top: 0;
    margin-right: 15px;
    margin-left: 60px;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}
.timeline > div > .timeline-item > .time {
    float: right;
    padding: 10px;
    font-size: 12px;
    color: var(--bs-secondary-color);
}
.timeline > div > .timeline-item > .timeline-header {
    padding: 10px;
    margin: 0;
    font-size: 16px;
    line-height: 1.1;
    color: var(--bs-secondary-color);
    border-bottom: 1px solid var(--bs-border-color);
}
.timeline > div > .timeline-item > .timeline-header > a {
    font-weight: 600;
    text-decoration: none;
}
.timeline > div > .timeline-item > .timeline-body,
.timeline > div > .timeline-item > .timeline-footer {
    padding: 10px;
}
.timeline > div > .timeline-item > .timeline-body > img {
    margin: 10px;
}
.timeline > div > .timeline-item > .timeline-body > dl,
.timeline > div > .timeline-item > .timeline-body ol,
.timeline > div > .timeline-item > .timeline-body ul {
    margin: 0;
}
.timeline > div .timeline-icon {
    position: absolute;
    top: 0;
    left: 18px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    background-color: var(--bs-secondary-bg);
    border-radius: 50%;
}
.timeline > .time-label > span {
    border-radius: 4px;
    display: inline-block;
    padding: 5px;
    font-weight: 600;
    background-color: var(--bs-body-bg);
}

.timeline-inverse > div > .timeline-item {
    box-shadow: none;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
}
.timeline-inverse > div > .timeline-item > .timeline-header {
    border-bottom-color: var(--bs-border-color);
}

.direct-chat .card-body {
    position: relative;
    padding: 0;
    overflow-x: hidden;
}
.direct-chat.chat-pane-open .direct-chat-contacts {
    transform: translate(0, 0);
}
.direct-chat.timestamp-light .direct-chat-timestamp {
    color: rgba(var(--bs-body-color-rgb), 0.65);
}
.direct-chat.timestamp-dark .direct-chat-timestamp {
    color: rgba(var(--bs-body-color-rgb), 0.9);
}

.direct-chat-messages {
    height: 250px;
    padding: 10px;
    overflow: auto;
    transform: translate(0, 0);
}

.direct-chat-msg,
.direct-chat-text {
    display: block;
}

.direct-chat-msg {
    margin-bottom: 10px;
}
.direct-chat-msg::after {
    display: block;
    clear: both;
    content: "";
}

.direct-chat-messages,
.direct-chat-contacts {
    transition: transform 0.5s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    .direct-chat-messages,
    .direct-chat-contacts {
        transition: none;
    }
}

.direct-chat-text {
    border-radius: 0.5rem;
    position: relative;
    padding: 5px 10px;
    margin: 5px 0 0 50px;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
}
.direct-chat-text::after, .direct-chat-text::before {
    position: absolute;
    top: 15px;
    right: 100%;
    width: 0;
    height: 0;
    pointer-events: none;
    content: " ";
    border: solid transparent;
    border-right-color: var(--bs-border-color);
}
.direct-chat-text::after {
    margin-top: -5px;
    border-width: 5px;
}
.direct-chat-text::before {
    margin-top: -6px;
    border-width: 6px;
}
.end .direct-chat-text {
    margin-right: 50px;
    margin-left: 0;
}
.end .direct-chat-text::after, .end .direct-chat-text::before {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: var(--bs-border-color);
}

.direct-chat-img {
    border-radius: 50%;
    float: left;
    width: 40px;
    height: 40px;
}
.end .direct-chat-img {
    float: right;
}

.direct-chat-infos {
    display: block;
    margin-bottom: 2px;
    font-size: 0.875rem;
}

.direct-chat-name {
    font-weight: 600;
}

.direct-chat-timestamp {
    color: rgba(var(--bs-body-color-rgb), 0.75);
}

.direct-chat-contacts-open .direct-chat-contacts {
    transform: translate(0, 0);
}

.direct-chat-contacts {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 250px;
    overflow: auto;
    color: var(--bs-body-bg);
    background-color: var(--bs-body-color);
    transform: translate(101%, 0);
}

.direct-chat-contacts-light {
    background-color: var(--bs-light-bg-subtle);
}
.direct-chat-contacts-light .contacts-list-name {
    color: var(--bs-body-color);
}
.direct-chat-contacts-light .contacts-list-date {
    color: var(--bs-secondary-color);
}
.direct-chat-contacts-light .contacts-list-msg {
    color: var(--bs-secondary-color);
}

.contacts-list {
    padding-left: 0;
    list-style: none;
}
.contacts-list > li {
    padding: 10px;
    margin: 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.contacts-list > li::after {
    display: block;
    clear: both;
    content: "";
}
.contacts-list > li:last-of-type {
    border-bottom: 0;
}
.contacts-list > li a {
    text-decoration: none;
}

.contacts-list-img {
    border-radius: 50%;
    float: left;
    width: 40px;
}

.contacts-list-info {
    margin-left: 45px;
    color: var(--bs-body-bg);
}

.contacts-list-name,
.contacts-list-status {
    display: block;
}

.contacts-list-name {
    font-weight: 600;
}

.contacts-list-status {
    font-size: 0.875rem;
}

.contacts-list-date {
    font-weight: 400;
    color: var(--bs-secondary-bg);
}

.contacts-list-msg {
    color: var(--bs-secondary-bg);
}

.end > .direct-chat-text {
    color: var(--lte-direct-chat-color);
    background-color: var(--lte-direct-chat-bg);
    border-color: var(--lte-direct-chat-bg);
}
.end > .direct-chat-text::after, .end > .direct-chat-text::before {
    border-left-color: var(--lte-direct-chat-bg);
}

.direct-chat-primary {
    --lte-direct-chat-color: #fff;
    --lte-direct-chat-bg: #0d6efd;
}

.direct-chat-secondary {
    --lte-direct-chat-color: #fff;
    --lte-direct-chat-bg: #6c757d;
}

.direct-chat-success {
    --lte-direct-chat-color: #fff;
    --lte-direct-chat-bg: #198754;
}

.direct-chat-info {
    --lte-direct-chat-color: #000;
    --lte-direct-chat-bg: #0dcaf0;
}

.direct-chat-warning {
    --lte-direct-chat-color: #000;
    --lte-direct-chat-bg: #ffc107;
}

.direct-chat-danger {
    --lte-direct-chat-color: #fff;
    --lte-direct-chat-bg: #dc3545;
}

.direct-chat-light {
    --lte-direct-chat-color: #000;
    --lte-direct-chat-bg: #f8f9fa;
}

.direct-chat-dark {
    --lte-direct-chat-color: #fff;
    --lte-direct-chat-bg: #212529;
}

.toast-primary {
    --bs-toast-header-color: #fff;
    --bs-toast-header-bg: #0d6efd;
    --bs-toast-header-border-color: #0d6efd;
    --bs-toast-border-color: #0d6efd;
    --bs-toast-bg: var(--bs-primary-bg-subtle);
}
.toast-primary .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

.toast-secondary {
    --bs-toast-header-color: #fff;
    --bs-toast-header-bg: #6c757d;
    --bs-toast-header-border-color: #6c757d;
    --bs-toast-border-color: #6c757d;
    --bs-toast-bg: var(--bs-secondary-bg-subtle);
}
.toast-secondary .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

.toast-success {
    --bs-toast-header-color: #fff;
    --bs-toast-header-bg: #198754;
    --bs-toast-header-border-color: #198754;
    --bs-toast-border-color: #198754;
    --bs-toast-bg: var(--bs-success-bg-subtle);
}
.toast-success .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

.toast-info {
    --bs-toast-header-color: #000;
    --bs-toast-header-bg: #0dcaf0;
    --bs-toast-header-border-color: #0dcaf0;
    --bs-toast-border-color: #0dcaf0;
    --bs-toast-bg: var(--bs-info-bg-subtle);
}

.toast-warning {
    --bs-toast-header-color: #000;
    --bs-toast-header-bg: #ffc107;
    --bs-toast-header-border-color: #ffc107;
    --bs-toast-border-color: #ffc107;
    --bs-toast-bg: var(--bs-warning-bg-subtle);
}

.toast-danger {
    --bs-toast-header-color: #fff;
    --bs-toast-header-bg: #dc3545;
    --bs-toast-header-border-color: #dc3545;
    --bs-toast-border-color: #dc3545;
    --bs-toast-bg: var(--bs-danger-bg-subtle);
}
.toast-danger .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

.toast-light {
    --bs-toast-header-color: #000;
    --bs-toast-header-bg: #f8f9fa;
    --bs-toast-header-border-color: #f8f9fa;
    --bs-toast-border-color: #f8f9fa;
    --bs-toast-bg: var(--bs-light-bg-subtle);
}

.toast-dark {
    --bs-toast-header-color: #fff;
    --bs-toast-header-bg: #212529;
    --bs-toast-header-border-color: #212529;
    --bs-toast-border-color: #212529;
    --bs-toast-bg: var(--bs-dark-bg-subtle);
}
.toast-dark .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme=dark] .toast-info .btn-close {
    --bs-btn-close-white-filter: none;
}
[data-bs-theme=dark] .toast-warning .btn-close {
    --bs-btn-close-white-filter: none;
}
[data-bs-theme=dark] .toast-light .btn-close {
    --bs-btn-close-white-filter: none;
}
.login-logo,
.register-logo {
    margin-bottom: 0.9rem;
    font-size: 2.1rem;
    font-weight: 300;
    text-align: center;
}
.login-logo a,
.register-logo a {
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.login-page,
.register-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box,
.register-box {
    width: 360px;
}
@media (max-width: 576px) {
    .login-box,
    .register-box {
        width: 90%;
        margin-top: 0.5rem;
    }
}
.login-box .card,
.register-box .card {
    margin-bottom: 0;
}

.login-card-body,
.register-card-body {
    padding: 20px;
    color: var(--bs-secondary-color);
    background-color: var(--bs-body-bg);
    border-top: 0;
}
.login-card-body .input-group .form-control:focus,
.register-card-body .input-group .form-control:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text,
.login-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text,
.register-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text {
    border-color: rgb(134, 182.5, 254);
}
.login-card-body .input-group .form-control.is-valid:focus,
.register-card-body .input-group .form-control.is-valid:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control.is-valid ~ .input-group-prepend .input-group-text,
.login-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-valid ~ .input-group-prepend .input-group-text,
.register-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text {
    border-color: #198754;
}
.login-card-body .input-group .form-control.is-invalid:focus,
.register-card-body .input-group .form-control.is-invalid:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text {
    border-color: #dc3545;
}
.login-card-body .input-group .input-group-text,
.register-card-body .input-group .input-group-text {
    color: var(--bs-secondary-color);
    background-color: transparent;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    .login-card-body .input-group .input-group-text,
    .register-card-body .input-group .input-group-text {
        transition: none;
    }
}

.login-box-msg,
.register-box-msg {
    padding: 0 20px 20px;
    margin: 0;
    text-align: center;
}

.social-auth-links {
    margin: 10px 0;
}

.lockscreen .lockscreen-name {
    font-weight: 600;
    text-align: center;
}
.lockscreen .lockscreen-logo {
    margin-bottom: 25px;
    font-size: 35px;
    font-weight: 300;
    text-align: center;
}
.lockscreen .lockscreen-logo a {
    color: var(--bs-emphasis-color);
    text-decoration: none;
}
.lockscreen .lockscreen-wrapper {
    max-width: 400px;
    margin: 0 auto;
    margin-top: 10%;
}
.lockscreen .lockscreen-item {
    position: relative;
    width: 290px;
    padding: 0;
    margin: 10px auto 30px;
    background-color: var(--bs-body-bg);
    border-radius: 4px;
}
.lockscreen .lockscreen-image {
    position: absolute;
    top: -25px;
    left: -10px;
    z-index: 10;
    padding: 5px;
    background-color: var(--bs-body-bg);
    border-radius: 50%;
}
.lockscreen .lockscreen-image > img {
    border-radius: 50%;
    width: 70px;
    height: 70px;
}
.lockscreen .lockscreen-credentials {
    margin-left: 70px;
}
.lockscreen .lockscreen-credentials .form-control {
    border: 0;
}
.lockscreen .lockscreen-credentials .btn {
    padding: 0 10px;
    border: 0;
}
.lockscreen .lockscreen-footer {
    margin-top: 10px;
}

.img-size-64,
.img-size-50,
.img-size-32 {
    height: auto;
}

.img-size-64 {
    width: 64px;
}

.img-size-50 {
    width: 50px;
}

.img-size-32 {
    width: 32px;
}

/* ==========================================================================
   AdminLTE Accessibility Styles - WCAG 2.1 AA Compliance
   ========================================================================== */
/* Skip Links - WCAG 2.4.1: Bypass Blocks */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 999999;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--bs-white);
    text-decoration: none;
    background: var(--bs-primary);
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--bs-warning);
    outline-offset: 2px;
}
.skip-link:hover {
    color: var(--bs-white);
    text-decoration: none;
    background: var(--bs-primary-emphasis);
}

/* Enhanced Focus Indicators - WCAG 2.4.7: Focus Visible */
.focus-enhanced:focus {
    outline: 3px solid var(--bs-focus-ring-color, #0d6efd);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid;
    }
    .btn {
        border-width: 2px;
    }
    .nav-link {
        border: 1px solid transparent;
    }
    .nav-link:hover, .nav-link:focus {
        border-color: currentcolor;
    }
}
/* Reduced Motion Support - WCAG 2.3.3: Animation from Interactions */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .fade {
        opacity: 1 !important;
        /* stylelint-disable-next-line property-disallowed-list */
        transition: none !important;
    }
    .collapse {
        /* stylelint-disable-next-line property-disallowed-list */
        transition: none !important;
    }
    .modal.fade .modal-dialog {
        transform: none !important;
    }
}
/* Screen Reader Only Content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Focus Trap Utilities */
.focus-trap:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Accessible Color Combinations - WCAG 1.4.3: Contrast (Minimum) */
.text-accessible-primary {
    color: #003d82; /* 4.5:1 contrast on white */
}

.text-accessible-success {
    color: #0f5132; /* 4.5:1 contrast on white */
}

.text-accessible-danger {
    color: #842029; /* 4.5:1 contrast on white */
}

.text-accessible-warning {
    color: #664d03; /* 4.5:1 contrast on white */
}

/* ARIA Live Regions */
.live-region {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.live-region.live-region-visible {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    overflow: visible;
}

/* Enhanced Error States - WCAG 3.3.1: Error Identification */
.form-control.is-invalid {
    border-color: var(--bs-danger);
}
.form-control.is-invalid:focus {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--bs-danger);
}
.invalid-feedback[role=alert] {
    font-weight: 600;
}

/* Target Size - WCAG 2.5.8: Target Size (Minimum) */
.touch-target {
    min-width: 44px;
    min-height: 44px;
}
.touch-target.touch-target-small {
    min-width: 24px;
    min-height: 24px;
}

/* Table Accessibility */
.table-accessible th {
    font-weight: 600;
    background-color: var(--bs-secondary-bg);
}
.table-accessible th[scope=col] {
    border-bottom: 2px solid var(--bs-border-color);
}
.table-accessible th[scope=row] {
    border-right: 2px solid var(--bs-border-color);
}
.table-accessible caption {
    padding: 0.75rem;
    font-weight: 600;
    color: var(--bs-secondary);
    text-align: left;
    caption-side: top;
}

/* Navigation Landmarks */
nav[role=navigation]:not([aria-label]):not([aria-labelledby])::before {
    position: absolute;
    left: -10000px;
    content: "Navigation";
}

/* Form Fieldset Styling */
fieldset {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-border-color);
}
fieldset legend {
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
    font-weight: 600;
}

/* Loading States */
.loading[aria-busy=true] {
    position: relative;
    pointer-events: none;
}
.loading[aria-busy=true]::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    content: "";
    border: 2px solid var(--bs-primary);
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .loading[aria-busy=true]::after {
        border-top-color: var(--bs-primary);
        animation: none;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Dark Mode Accessibility */
[data-bs-theme=dark] .text-accessible-primary {
    color: #6ea8fe;
}
[data-bs-theme=dark] .text-accessible-success {
    color: #75b798;
}
[data-bs-theme=dark] .text-accessible-danger {
    color: #f1aeb5;
}
[data-bs-theme=dark] .text-accessible-warning {
    color: #ffda6a;
}

/* Print Accessibility */
@media print {
    .skip-link,
    .btn,
    .nav-link {
        color: #000 !important;
        background: transparent !important;
        border: 1px solid #000 !important;
    }
    a[href^=http]::after {
        font-size: 0.8em;
        content: " (" attr(href) ")";
    }
}

.login-page,
.register-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box,
.register-box {
    width: 360px;
}
@media (max-width: 576px) {
    .login-box,
    .register-box {
        width: 90%;
        margin-top: 0.5rem;
    }
}
.login-box .card,
.register-box .card {
    margin-bottom: 0;
}

.login-card-body,
.register-card-body {
    padding: 20px;
    color: var(--bs-secondary-color);
    background-color: var(--bs-body-bg);
    border-top: 0;
}
.login-card-body .input-group .form-control:focus,
.register-card-body .input-group .form-control:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text,
.login-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control:focus ~ .input-group-prepend .input-group-text,
.register-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text {
    border-color: rgb(134, 182.5, 254);
}
.login-card-body .input-group .form-control.is-valid:focus,
.register-card-body .input-group .form-control.is-valid:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control.is-valid ~ .input-group-prepend .input-group-text,
.login-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-valid ~ .input-group-prepend .input-group-text,
.register-card-body .input-group .form-control.is-valid ~ .input-group-append .input-group-text {
    border-color: #198754;
}
.login-card-body .input-group .form-control.is-invalid:focus,
.register-card-body .input-group .form-control.is-invalid:focus {
    box-shadow: none;
}
.login-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text,
.register-card-body .input-group .form-control.is-invalid ~ .input-group-append .input-group-text {
    border-color: #dc3545;
}
.login-card-body .input-group .input-group-text,
.register-card-body .input-group .input-group-text {
    color: var(--bs-secondary-color);
    background-color: transparent;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    .login-card-body .input-group .input-group-text,
    .register-card-body .input-group .input-group-text {
        transition: none;
    }
}

.login-box-msg,
.register-box-msg {
    padding: 0 20px 20px;
    margin: 0;
    text-align: center;
}
