:root {
    --bs-accent: #954bff;
    --bs-urgent: #ff0000;
}
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Sidebar =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#sidebar-wrapper .sidebar-heading {
    text-align: center;
}

.list-group-flush .list-group-item {
    text-align: center;
}

.navbar {
    justify-content: flex-end;
}

.nav-link-label {
    text-align: center;
}

.nav-link {
    text-align: center;
}

#div_id_starttime.form-group {
    margin-bottom: 0 !important;
}

#div_id_endtime.form-group {
    margin-bottom: 0 !important;
}

.input-group-text {
    height: 100%;
}

/* Sidebar opening animation */
.unplanned-sidebar.open {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        right: -420px;
    }
    to {
        right: 0;
    }
}

/* Mobile version */
@media (max-width: 768px) {
    .unplanned-sidebar.open {
        animation: slideInFromRightMobile 0.3s ease-out;
    }

    @keyframes slideInFromRightMobile {
        from {
            right: -100vw;
        }
        to {
            right: 0;
        }
    }
}

/* Sidebar overlay (also add this if not already in main CSS) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Login Screen =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */

.Login_form {
    display: flex;
    flex-direction: column;
}

.login_button {
    cursor: pointer;
}

.container {
    max-width: 100%;
    margin-top: 20px;
}

/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Mobile View =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */

@media only screen
    and (min-width: 320px)
    and (max-width: 768px) {
        .navbar {
            display: flex;
            justify-content: flex-end;
        }

        #sidebar-wrapper {
            display: none;
        }

        .container {
            max-width: 100%;
            margin-top: 20px;
        }
}

.note-content p, .note-card-body p {
    margin-bottom: 0;
}

/* Prevent zoom functionality on IOS devices */
@supports (-webkit-touch-callout: none) and (not (translate: none)) {
    .modal .CodeMirror,
    .modal .CodeMirror textarea,
    .modal textarea {
        font-size: 16px !important;
        transform: scale(1.0001); /* Trick to prevent zoom */
    }
}

/* Shared styles for all priority headers */
.damage-card-header {
    color: white;
}

/* Priority Badges - Mapped to your custom header colors */
.priority-badge-urgent,
.priority-badge-high {
    /* Both Urgent and High use the 'danger' theme for a red badge */
    background-color: var(--bs-danger-bg-subtle) !important;
    color: var(--bs-danger-text-emphasis) !important;
    border: 1px solid var(--bs-danger-border-subtle) !important;
}

.priority-badge-medium {
    /* Medium uses the 'warning' theme for a yellow badge */
    background-color: var(--bs-warning-bg-subtle) !important;
    color: var(--bs-warning-text-emphasis) !important;
    border: 1px solid var(--bs-warning-border-subtle) !important;
}

.priority-badge-low {
    /* Low uses the 'primary' theme for a blue badge */
    background-color: var(--bs-primary-bg-subtle) !important;
    color: var(--bs-primary-text-emphasis) !important;
    border: 1px solid var(--bs-primary-border-subtle) !important;
}

.priority-badge-apk {
    /* APK uses the 'info' theme for a light blue/cyan badge */
    background-color: var(--bs-info-bg-subtle) !important;
    color: var(--bs-info-text-emphasis) !important;
    border: 1px solid var(--bs-info-border-subtle) !important;
}

.priority-badge-repairer {
    /* Repairer uses the 'secondary' theme for a grey badge (mapping from your 'accent' color) */
    background-color: var(--bs-secondary-bg-subtle) !important;
    color: var(--bs-secondary-text-emphasis) !important;
    border: 1px solid var(--bs-secondary-border-subtle) !important;
}


/* Status Badges - These remain the same */
.status-badge-open {
    background-color: var(--bs-info-bg-subtle) !important;
    color: var(--bs-info-text-emphasis) !important;
    border: 1px solid var(--bs-info-border-subtle) !important;
}

.status-badge-in_progress {
    background-color: var(--bs-warning-bg-subtle) !important;
    color: var(--bs-warning-text-emphasis) !important;
    border: 1px solid var(--bs-warning-border-subtle) !important;
}

.status-badge-repaired {
    background-color: var(--bs-success-bg-subtle) !important;
    color: var(--bs-success-text-emphasis) !important;
    border: 1px solid var(--bs-success-border-subtle) !important;
}


/* Ensure text in the header remains the correct color even when nested */
.damage-card-header .text-white {
    color: inherit !important;
}