:root {
    --primary-color: #911132;
    --secondary-color: #f0a800;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --sidebar-bg: #fff;
    --sidebar-text: #555;
    --sidebar-active-bg: #f8f9fa;
    --sidebar-active-text: var(--primary-color);
    --status-new: #17a2b8;
    --status-investigation: #ffc107;
    --status-closed: #28a745;
}

body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #fff;
    text-align: center;
    border-bottom: 1px solid #f2f2f2;
}

#sidebar .sidebar-header img {
    max-height: 60px;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#sidebar .sidebar-header strong {
    display: none;
    font-size: 1.8em;
}


#sidebar ul.components {
    padding: 20px 0;
}


#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1.1em;
    display: block;
    color: var(--sidebar-text);
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    color: var(--primary-color);
    background: var(--sidebar-active-bg);
}

#sidebar ul li.active > a,
a[aria-expanded="true"] {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
    border-left: 3px solid var(--primary-color);
}

a[data-toggle="collapse"] {
    position: relative;
}

#content {
    width: 100%;
    padding: 0 0 0 250px; /* Leave space for sidebar */
    min-height: 100vh;
    transition: all 0.3s;
}

#content.active {
    padding-left: 0;
}


#sidebarCollapse {
    background: transparent;
    border: none;
    color: #777;
    font-size: 1.5rem;
}

.btn-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-custom:hover {
    background-color: #7a0f2a;
    border-color: #7a0f2a;
    color: #fff;
}

#user-profile-pic {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
}

.dashboard-card {
    border: none;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.dashboard-card .card-text {
    font-size: 2.5rem;
    font-weight: 700;
}

.chart-container {
    height: 300px; /* Adjusted height for better view */
    padding: 1rem;
    background-color: #fff;
    border-radius: .375rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.status {
    padding: 0.25em 0.6em;
    border-radius: 1em;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}
.status-new { background-color: var(--status-new); }
.status-investigation { background-color: var(--status-investigation); }
.status-closed { background-color: var(--status-closed); }

.ai-section {
    background-color: #fdeee2;
    border: 1px solid #fadac1;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Task Board Styles */
.task-column {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    min-height: 400px;
    height: 100%;
    overflow-y: auto; /* Scroll if content overflows */
}

.task-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
}

.task-card h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.task-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.task-meta .badge {
    font-size: 0.8rem;
}

.divider-text {
    position: relative;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

.divider-text span {
    padding: 0 10px;
    background-color: #fff;
    position: relative;
    z-index: 2;
    color: #6c757d;
}

.divider-text:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #dee2e6;
    left: 0;
    top: 50%;
    z-index: 1;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(145, 17, 50, 0.25);
}

.user-picker-container {
    position: relative;
}

.user-select-list {
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    z-index: 1050; /* Ensure it's above other modal content */
    width: 100%;
    border-radius: 0 0 .375rem .375rem;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.collapsible-container .card-header {
    cursor: pointer;
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        padding-left: 0;
    }
    #content.active {
        padding-left: 250px; /* This seems inverted, but it's for when the sidebar is toggled open */
    }
    #sidebar .sidebar-header strong {
        display: block;
    }
    #sidebar .sidebar-header img {
        display: none;
    }
}
/* Styling for the Gemini Thinking Process Box */
.ai-thinking-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
}

.ai-thinking-box pre {
    max-height: 200px; /* Limits the height */
    overflow-y: auto;   /* Adds a vertical scrollbar if needed */
    white-space: pre-wrap; /* Wraps long lines of text */
    word-break: break-word; /* Breaks long words to prevent overflow */
    font-size: 0.8em;
    color: #495057;
}
/* Fix for stacking the file delete modal on top of the details modal */
#deleteFileConfirmModal {
  z-index: 1060;
}