@font-face {
    font-family: 'Ethnocentric';
    src: url('Ethnocentric-Regular.otf') format('truetype');
    /* or url('fonts/ethnocentric.ttf') if in a subfolder */
    font-weight: normal;
    font-style: normal;
}

:root {
    --med-blue: #009cde;
    --dark-blue: #00224a;
    --med-gray: #bebebf;

    --mustard: #ccaa57;
    --plum: #482248;
    --light-blue: #1b99d6;
    --light-gray: #e2e3e4;

    --dark-gray: #5d5d5d;

    --red: #dc3545;
    --red-hover: #b41e2d;

    --green: #52af30;
    --green-hover: #479c28;
    

    --med-blue-hover: #0090ce;
    --dark-blue-hover: #001c3b;
    --med-gray-hover: #aeaeb1;

    --mustard-hover: #bf9f4e;
    --plum-hover: #3c1c3c;
    --light-blue-hover: #168dc8;
    --light-gray-hover: #d0d2d4;

    --white-hover: #f5f9fc;

    --light-green: #9ce29b;
    --light-yellow: #f4edac;
    --light-red: #ecb0b0;
    --lighter-blue: #d6f5ff;

    --yellow: #f8d671;
    --yellow-hover: #ebc860;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

.container {
    max-width: 2400px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    /* background-image: url('bg.png'); */
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--med-blue) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-family: 'Ethnocentric', sans-serif;
    letter-spacing: 0.05em; /* Adjust spacing if needed */
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.toolbar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 12px;
}

select, input, textarea {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 14px;
}

/* Hide number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--med-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--med-blue-hover);
}

.btn-success {
    background: var(--dark-blue);
    color: white;
}

.btn-success:hover {
    background: var(--dark-blue-hover);
}

.btn-warning {
    background: var(--yellow);
    color: black;
}

.btn-warning:hover {
    background: var(--yellow-hover);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: var(--red-hover);
}

.btn-info {
    background: var(--light-blue);
    color: white;
}

.btn-info:hover {
    background: var(--light-blue-hover);
}

.btn-secondary {
    background: var(--med-gray);
    color: black;
}

.btn-secondary:hover {
    background: var(--med-gray-hover);
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-height: 80vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray-hover);
    font-weight: 600;
    color: var(--dark-gray);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.hierarchy-tree {
    padding: 20px;
}

.tree-node {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--dark-gray)
}

.btn-edit {
    background: var(--med-blue);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.tree-node:hover .btn-edit {
    opacity: 1;
}

.btn-edit:hover {
    background: var(--med-blue);
}

.tree-node:hover {
    background: var(--light-gray);
}

.tree-node.active {
    background: var(--med-blue);
    color: white;
}

.tree-node.level-1 { margin-left: 0; }
.tree-node.level-2 { margin-left: 20px; }
.tree-node.level-3 { margin-left: 40px; }
.tree-node.level-4 { margin-left: 60px; }

.tree-icon {
    width: 16px;
    height: 16px;
}

.content-area {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--med-gray);
    overflow-x: auto;
}

.tab {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--dark-gray);
}

.tab:hover {
    background: var(--light-gray);
}

.tab.active {
    border-bottom-color: var(--med-blue);
    color: var(--med-blue);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-content.active {
    display: block;
}

.evm-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.evm-card {
    background: linear-gradient(135deg, var(--white-hover) 0%, white 100%);
    border: 1px solid var(--med-gray);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.evm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.evm-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
}

.evm-value.positive { color: var(--green); }
.evm-value.negative { color: var(--red); }
.evm-value.neutral { color: var(--dark-gray); }

.evm-label {
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Custom Tooltip Styles */
.evm-card[title] {
    position: relative;
}

.evm-card[title]::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: normal;
    max-width: 350px;
    width: max-content;
    text-align: left;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.evm-card[title]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.evm-card[title]:hover::before,
.evm-card[title]:hover::after {
    opacity: 1;
    visibility: visible;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.grid-table th,
.grid-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.grid-table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--dark-gray);
    position: sticky;
    top: 0;
    z-index: 10;
}

.grid-table tr:hover {
    background: var(--white-hover);
}

/* Resource Planning Grid Optimizations */
#resourceGrid {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#resourceGrid th,
#resourceGrid td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

#resourceGrid th {
    background: var(--white-hover);
    font-weight: 600;
    color: var(--dark-gray);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* LEFT STICKY COLUMNS */

/* Resource Name - First sticky column */
#resourceGrid th:nth-child(1),
#resourceGrid td:nth-child(1) {
    position: sticky;
    left: 0;
    background: white;
    z-index: 20;
    width: 140px;
    min-width: 140px;
    text-align: left;
    padding-left: 8px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#resourceGrid thead th:nth-child(1) {
    background: var(--white-hover);
    z-index: 30;
}

/* Department - Second sticky column */
#resourceGrid th:nth-child(2),
#resourceGrid td:nth-child(2) {
    position: sticky;
    left: 140px;
    background: var(--white-hover);
    z-index: 19;
    width: 100px;
    min-width: 100px;
    text-align: left;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#resourceGrid thead th:nth-child(2) {
    background: var(--white-hover);
    z-index: 29;
}

/* Rate - Third sticky column */
#resourceGrid th:nth-child(3),
#resourceGrid td:nth-child(3) {
    position: sticky;
    left: 240px;
    background: white;
    z-index: 18;
    width: 80px;
    min-width: 80px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#resourceGrid thead th:nth-child(3) {
    background: var(--white-hover);
    z-index: 28;
}

/* Date columns - scrollable middle section */
#resourceGrid .date-column {
    width: 65px;
    min-width: 65px;
    font-size: 11px;
    padding: 4px 2px;
    white-space: nowrap;
}

/* RIGHT STICKY COLUMNS */

/* Total Hours - Second to last column */
#resourceGrid th:nth-last-child(2),
#resourceGrid td:nth-last-child(2) {
    position: sticky;
    right: 90px; /* Width of last column */
    background: white;
    z-index: 18;
    width: 80px;
    min-width: 80px;
    font-weight: bold;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

#resourceGrid thead th:nth-last-child(2) {
    background: var(--white-hover);
    z-index: 28;
}

/* Total Cost - Last column */
#resourceGrid th:last-child,
#resourceGrid td:last-child {
    position: sticky;
    right: 0;
    background: white;
    z-index: 19;
    width: 90px;
    min-width: 90px;
    font-weight: bold;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

#resourceGrid thead th:last-child {
    background: var(--white-hover);
    z-index: 29;
}

/* Input fields in date columns */
#resourceGrid input[type="number"] {
    width: 55px;
    padding: 3px;
    font-size: 12px;
    text-align: center;
    border: 1px solid var(--med-gray);
}

/* Container for horizontal scroll */
#resourceGrid-container {
    overflow-x: auto;
    width: 100%;
    position: relative;
}

/* Overallocation styling for TO/IDIQ levels */
#resourceGrid .overallocated-cell {
    background-color: var(--red) !important;
    color: white !important;
    font-weight: bold !important;
    box-shadow: 0 0 3px var(--red-hover);
    border: 2px solid var(--red) !important;
}

#resourceGrid .overallocated-cell:hover {
    background-color: var(--red) !important;
    transform: scale(1.02);
    transition: all 0.2s;
}

/* Outside PoP styling */
#resourceGrid .outside-pop-cell {
    background-color: var(--white-hover) !important;
    color: var(--dark-gray) !important;
    opacity: 0.7 !important;
    font-style: italic;
}

/* Fallback for very small screens */
@media (max-width: 1400px) {
    #resourceGrid .date-column {
        width: 55px;
        min-width: 55px;
        font-size: 10px;
    }
    
    #resourceGrid input[type="number"] {
        width: 45px;
        font-size: 11px;
        padding: 2px;
    }
    
    #resourceGrid th:nth-child(1),
    #resourceGrid td:nth-child(1) {
        width: 120px;
        min-width: 120px;
    }
    
    #resourceGrid th:nth-child(2),
    #resourceGrid td:nth-child(2) {
        width: 80px;
        min-width: 80px;
    }
}


/* Overallocation styling for TO/IDIQ levels */
#resourceGrid .overallocated-cell {
    background-color: var(--red) !important;
    color: white !important;
    font-weight: bold !important;
    box-shadow: 0 0 3px var(--red-hover);
    border: 2px solid var(--red) !important;
}

#resourceGrid .overallocated-cell:hover {
    background-color: var(--red) !important;
    transform: scale(1.02);
    transition: all 0.2s;
}

/* Outside PoP styling */
#resourceGrid .outside-pop-cell {
    background-color: var(--white-hover) !important;
    color: var(--dark-gray) !important;
    opacity: 0.7 !important;
    font-style: italic;
}

/* LCAT Summary specific styles */
.lcat-summary-header {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--white-hover);
    border-radius: 8px;
    border-left: 4px solid var(--med-blue);
}

.lcat-summary-table .number-cell {
    text-align: right;
    font-weight: 500;
}

.lcat-summary-table .description-cell {
    font-style: italic;
    color: var(--dark-gray);
    max-width: 300px;
}

.lcat-summary-table .total-row {
    background: var(--white-hover);
    border-top: 2px solid var(--med-blue);
    font-weight: bold;
}

.lcat-summary-table .total-row td {
    border-top: 2px solid var(--light-gray);
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    background: var(--light-yellow);
    border: 1px solid var(--med-gray);
    color: var(--mustard-hover);
}

.alert-danger {
    background: var(--light-red);
    border: 1px solid var(--med-gray);
    color: var(--red-hover);
}

.alert-success {
    background: var(--light-green);
    border: 1px solid var(--med-gray);
    color: var(--green-hover);
}

.alert-info {
    background: var(--light-gray);
    border: 1px solid var(--med-gray);
    color: var(--med-blue);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--med-gray);
}

.close:hover {
    color: var(--dark-gray);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.audit-entry {
    padding: 10px;
    border-left: 3px solid var(--med-blue);
    margin: 10px 0;
    background: var(--white-hover);
    border-radius: 4px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success { background: var(--green); color: white; }
.notification.error { background: var(--red); color: white; }
.notification.warning { background: var(--yellow); color: var(--dark-blue); }
.notification.info { background: var(--light-blue); color: white; }

.alert-row {
    background-color: var(--light-yellow) !important;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
}

.overtime-cell {
    background-color: var(--light-red);
}

.alerts-cell {
    text-align: center;
    font-size: 16px;
    cursor: help;
}

.date-column {
    min-width: 80px;
    font-size: 11px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 5px 3px !important;
}

.gantt-container {
    border: 1px solid var(--med-gray);
    border-radius: 8px;
    overflow: hidden;
}

.gantt-header {
    display: flex;
    background: var(--white-hover);
    border-bottom: 2px solid var(--med-gray);
    font-weight: bold;
}

.gantt-project-column {
    width: 250px;
    padding: 15px;
    border-right: 1px solid var(--med-gray);
    background: white;
}

.gantt-timeline {
    display: flex;
    flex: 1;
    position: relative;
}

.gantt-month {
    border-right: 1px solid var(--med-gray);
    padding: 10px 5px;
    text-align: center;
    font-size: 12px;
    min-width: 120px;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    min-height: 50px;
}

.gantt-row:hover {
    background: var(--white-hover);
}

.project-details {
    font-size: 11px;
    color: var(--dark-gray);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .sidebar {
        max-height: 300px;
    }
}

.rate-history-icon {
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 16px;
}

.rate-history-icon:hover {
    opacity: 1;
}

.rate-history-list {
    margin: 20px 0;
}

.rate-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: var(--white-hover);
    border-radius: 6px;
    border-left: 3px solid var(--med-blue);
}

.rate-entry.current {
    background: var(--lighter-blue);
    border-left-color: var(--green);
}

.rate-details {
    flex: 1;
}

.rate-date {
    font-weight: 600;
    color: var(--dark-gray);
}

.rate-amount {
    font-size: 1.2rem;
    color: var(--med-blue);
    font-weight: 700;
}

.rate-actions {
    display: flex;
    gap: 8px;
}

#resourceGrid thead th:last-child {
    background: var(--white-hover);
    z-index: 29;
}

#resourceGrid thead th:nth-child(3) {
    background: var(--white-hover);
    z-index: 28;
}

/* Make sure table layout is auto, not fixed */
#resourceGrid {
    table-layout: auto;  /* Change from fixed */
    width: max-content;  /* Allow table to be wider than container */
    border-collapse: collapse;
    background: white;
}

/* Ensure container allows horizontal scroll */
#resourceGrid-container {
    overflow-x: auto;
    width: 100%;
    position: relative;
}

/* Calendar View Styles */
.calendar-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.calendar-resources {
    border-right: 2px solid var(--med-gray);
    padding-right: 15px;
}

.calendar-resource-item {
    padding: 10px;
    margin-bottom: 5px;
    background: var(--white-hover);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-resource-item:hover {
    background: var(--light-gray);
}

.calendar-resource-item.selected {
    background: var(--med-blue);
    color: white;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--med-gray);
    border: 1px solid var(--med-gray);
}

.calendar-day-header {
    background: var(--med-blue);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 8px;
    position: relative;
    border: 1px solid var(--light-gray);
}

.calendar-day-date {
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.calendar-day.weekend {
    background: var(--white-hover);
}

.calendar-day.holiday {
    background: var(--light-yellow);
}

.calendar-day.outside-month {
    background: var(--white-hover);
    opacity: 0.6;
}

.calendar-allocation {
    background: var(--med-blue);
    color: white;
    padding: 4px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.calendar-allocation:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.calendar-allocation.overallocated {
    background: var(--red);
}

.calendar-allocation.optimal {
    background: var(--green);
}

.calendar-allocation.underallocated {
    background: var(--yellow);
    color: white;
}

.calendar-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--white-hover);
    border-radius: 4px;
}

.calendar-month-nav button {
    padding: 8px 16px;
}

.calendar-month-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--med-blue);
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--white-hover);
    border-radius: 4px;
    flex-wrap: wrap;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}
.procas-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;  /* Add this line */
}
.procas-modal-content {
    background-color: white;
    margin: 2% auto;  /* Changed from 10% to 2% for better positioning */
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;  /* Increased from 500px */
    max-height: 90vh;  /* Maximum 90% of viewport height */
    overflow-y: auto;  /* Enable scrolling */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.procas-modal h2 {
    margin-top: 0;
    color: var(--med-blue);
}
.procas-form-group {
    margin-bottom: 20px;
}
.procas-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark-blue);
}
.procas-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--med-gray);
    border-radius: 4px;
    font-size: 14px;
}
.procas-form-group input:focus {
    outline: none;
    border-color: var(--med-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}
.procas-button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}
.procas-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}
.procas-btn-primary {
    background-color: var(--light-blue);
    color: white;
}
.procas-btn-primary:hover {
    background-color: var(--light-blue-hover);
}
.procas-btn-secondary {
    background-color: var(--white-hover);
    color: var(--dark-blue);
}
.procas-btn-secondary:hover {
    background-color: var(--med-gray);
}
.procas-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}
.procas-status.success {
    background-color: var(--light-green);
    color: var(--green-hover);
}
.procas-status.error {
    background-color: var(--light-red);
    color: var(--red-hover);
}
.procas-status.info {
    background-color: var(--light-blue);
    color: var(--med-blue);
}

/* Cross-Project Allocation Display Styles */

/* Other allocations info box */
.other-allocations {
    font-size: 0.75em;
    color: var(--dark-gray);
    margin-top: 4px;
    padding: 6px 4px 4px 4px;
    border-top: 1px solid var(--med-gray);
    background: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    max-width: 200px;
}

.allocation-detail {
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.allocation-total-display {
    font-weight: bold;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--med-gray);
    font-size: 1.05em;
}

.allocation-total-display.warning {
    color: var(--red);
}

.allocation-total-display.error {
    color: var(--red-hover);
    font-weight: bold;
}

/* Make sure input cells have proper layout */
#resourceGrid td {
    vertical-align: top;
}

#resourceGrid input[type="number"] {
    display: block;
    margin-bottom: 0;
}

/* Cross-Project Allocation Display Styles - Compact Version */

/* Compact other allocations info */
.other-allocations-compact {
    font-size: 0.40em;  /* Your smaller size */
    color: var(--dark-gray);
    margin-top: 3px;
    padding: 3px 2px;
    border-top: 1px solid var(--med-gray);
    background: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
}

.other-project-line {
    padding: 1px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dark-gray);
    font-size: 1em;  /* Keep same size as parent - don't make it bigger */
}

.total-line {
    font-weight: bold;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid var(--med-gray);
    font-size: 1em;  /* CHANGED from 1.1em - keep same size as parent */
    color: var(--dark-gray);
}

.total-line.total-warning {
    color: var(--red);
}

.total-line.total-error {
    color: var(--red-hover);
}

/* Make sure input cells have proper layout */
#resourceGrid td {
    vertical-align: top;
}

#resourceGrid input[type="number"] {
    display: block;
    margin-bottom: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.header h1 {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.5em;
    opacity: 0.95;
}

.btn-change-user {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1.5px solid white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-change-user:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tree-node {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--dark-gray)
}

.tree-caret {
    cursor: pointer;
    width: 16px;
    text-align: center;
    user-select: none;
    font-size: 10px;
    color: var(--dark-gray);
    transition: transform 0.2s;
}

.tree-caret:hover {
    color: var(--med-blue);
    transform: scale(1.2);
}

/* Over-allocation Alert Modal */
.overallocation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000; /* Higher than other modals */
    animation: fadeIn 0.2s ease;
}

.overallocation-modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-top: 6px solid var(--red);
}

.overallocation-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.overallocation-icon {
    font-size: 48px;
    color: var(--red);
}

.overallocation-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--red);
    margin: 0;
}

.overallocation-details {
    background: var(--light-red);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--red);
}

.overallocation-details strong {
    color: var(--red-hover);
}

.overallocation-warning {
    margin: 15px 0;
    color: var(--dark-gray);
    line-height: 1.6;
}

.overallocation-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel-overallocation {
    background-color: var(--green);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-cancel-overallocation:hover {
    background-color: var(--green-hover);
}

.btn-proceed-overallocation {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    padding: 12px 24px;
    border: 2px solid var(--med-gray);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-proceed-overallocation:hover {
    background-color: var(--red);
    color: white;
    border-color: var(--red);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.inbox-badge {
    background: var(--red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 4px;
    vertical-align: super;
}

.btn-inbox {
    background: var(--dark-blue);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 15px;
    transition: all 0.2s;
}

.btn-inbox:hover {
    background: var(--dark-blue-hover);
    transform: translateY(-1px);
}

.option-card:hover {
    border-color: var(--light-blue) !important;
    background: #f8f9ff;
}

.option-card input[type="radio"]:checked + strong {
    color: var(--light-blue);
}

/* Timeline View Styles */
#timelineContainer {
    background: #f8f9fa;
}

#timelineView::-webkit-scrollbar,
#timelineEntities::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#timelineView::-webkit-scrollbar-track,
#timelineEntities::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#timelineView::-webkit-scrollbar-thumb,
#timelineEntities::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#timelineView::-webkit-scrollbar-thumb:hover,
#timelineEntities::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Collapsible Settings Sections */
.settings-section-collapsible {
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.settings-section-header {
    background: var(--med-gray);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s ease;
}

.settings-section-header:hover {
    background: var(--med-gray-hover);
}

.settings-section-header h4 {
    margin: 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-icon {
    font-size: 1.3em;
    transition: transform 0.3s ease;
}

.settings-section-icon.collapsed {
    transform: rotate(-90deg);
}

.settings-section-body {
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
}

.settings-section-body.collapsed {
    display: none;
}

/* Improved settings section styling */
.settings-section-collapsible .form-row {
    margin-bottom: 15px;
}

.settings-section-collapsible table {
    margin-top: 15px;
}

/* Add subtle divider between form rows */
.settings-section-body .form-row:not(:last-child) {
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f5;
}

/* Loading overlay for resource planning */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-progress-box {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.animated-progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 100%;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Print styles for monthly resource planning report */
@media print {
    @page {
        size: 8.5in 11in;
        margin: 0.5in;
    }

    body {
        margin: 0;
        padding: 0;
    }

    /* Hide everything except the print content */
    .sidebar,
    .tab-navigation,
    .btn,
    button,
    .date-range-container,
    .btn-group,
    #allocationModeDescription,
    #projectPeriodAlert,
    .print-hide {
        display: none !important;
    }

    /* Show only the content area */
    .content {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Print-specific table styles */
    .print-report-container {
        width: 100%;
        font-size: 9pt;
    }

    .print-report-header {
        text-align: center;
        margin-bottom: 20px;
        page-break-after: avoid;
    }

    .print-report-header h2 {
        font-size: 16pt;
        margin-bottom: 5px;
    }

    .print-report-header .report-date {
        font-size: 9pt;
        color: #666;
        margin-bottom: 10px;
    }

    .print-report-header .report-info {
        font-size: 10pt;
        margin-bottom: 5px;
    }

    .print-monthly-grid {
        width: 100%;
        border-collapse: collapse;
        font-size: 8pt;
        page-break-inside: avoid;
    }

    .print-monthly-grid th {
        background-color: #f0f0f0 !important;
        border: 1px solid #333 !important;
        padding: 4px 2px;
        font-weight: bold;
        text-align: center;
        font-size: 7pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-monthly-grid td {
        border: 1px solid #666 !important;
        padding: 3px 2px;
        text-align: center;
        font-size: 8pt;
    }

    .print-monthly-grid td.text-left {
        text-align: left;
        padding-left: 5px;
    }

    .print-monthly-grid tfoot td {
        background-color: #f8f9fa !important;
        font-weight: bold;
        border-top: 2px solid #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Utilization colors for print */
    .print-util-green {
        background-color: #d4edda !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-util-yellow {
        background-color: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-util-red {
        background-color: #f8d7da !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-legend {
        margin-top: 10px;
        font-size: 8pt;
        page-break-inside: avoid;
    }

    .print-legend-item {
        display: inline-block;
        margin-right: 15px;
        padding: 2px 6px;
        border: 1px solid #666;
    }

    /* Prevent page breaks inside table rows */
    tr {
        page-break-inside: avoid;
    }
}