body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

.container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 40px);
}

.left-panel {
    width: 300px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.post-it-container {
    position: relative;
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    box-sizing: border-box;
}

.right-panel {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding-left: 40px;
}

.table-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    min-height: 0;
}

.grid-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    min-width: 100%;
    min-height: 0;
}

.row-labels {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    pointer-events: none;
    z-index: 10;
    min-width: 40px;
}

.row-label {
    position: absolute;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}


.row-label-text {
    margin-right: 8px;
}

.row-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s ease;
    pointer-events: auto;
}

.row-toggle-btn:hover {
    filter: brightness(1.2);
}

.row-toggle-btn .material-icons {
    font-size: 16px;
    color: #333;
}

.row-toggle-btn.collapsed .material-icons {
    color: #666;
}

.grid-row.collapsed {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
}

.row-label.collapsed .row-label-text {
    display: none;
}

.row-label.collapsed {
    justify-content: center;
}

/* Grid layout - always 3 rows */
.grid-rows {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    min-height: 0;
}


.grid-header {
    display: grid;
    grid-template-columns: repeat(4, calc(100% - 100px));
    gap: 5px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 100%;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(4, calc(100% - 100px));
    gap: 5px;
    width: 100%;
    max-width: 100%;
}

.grid-cell {
    text-align: left;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px;
    box-sizing: border-box;
    min-width: calc(100% - 100px);
    border-radius: 6px;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.header-cell {
    background: #156082;
    color: white;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    height: 58px;
    transition: opacity 0.3s ease;
    position: relative;
}

.phase-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.phase-delete-btn {
    position: absolute;
    top: 13px;
    left: 13px;
    bottom: 13px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    opacity: 0;
}

.header-cell:hover .phase-delete-btn {
    opacity: 1;
}

.phase-delete-btn .material-icons {
    font-size: 16px;
    line-height: 1;
}

.phase-delete-btn:hover {
    filter: brightness(1.2);
}

/* Dynamic even/odd styling using JavaScript-added classes */
.grid-row.visible-even .grid-cell {
    background: #CAD1D8 !important;
}

.grid-row.visible-odd .grid-cell {
    background: #E7E9EC !important;
}


/* Ensure no other background rules interfere */
.grid-row .grid-cell {
    background: #CAD1D8; /* Default fallback */
}


.phase-info {
    font-size: 12px;
    color: white;
    font-weight: normal;
}



.add-phase-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s ease;
}

.add-phase-btn:hover {
    filter: brightness(1.1);
}

.add-phase-btn:active {
    transform: scale(0.95);
}

.add-phase-btn.floating {
    position: absolute;
    top: 11px;
    right: 20px;
    z-index: 100;
}

.new-course-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 29px;
    height: 58px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    margin: 0 10px 10px 10px;
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.new-course-btn:hover {
    filter: brightness(1.1);
}

.new-course-btn:active {
    transform: translateY(0);
}

.download-report-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 29px;
    height: 58px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    margin: 0 10px 10px 10px;
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.download-report-btn:hover {
    filter: brightness(1.1);
}

.download-report-btn:active {
    transform: translateY(0);
}

.download-report-btn .material-icons {
    font-size: 18px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.modal-header {
    background: #156082;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: filter 0.2s ease;
}

.modal-close:hover {
    filter: brightness(1.2);
}

.form-group {
    padding: 20px;
    padding-bottom: 0;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #156082;
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
}

.error-message {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
}

.error-message.show {
    display: block;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dropdown-selected:hover {
    border-color: #156082;
}

.dropdown-selected:focus {
    outline: none;
    border-color: #156082;
}

.dropdown-selected.error {
    border-color: #e74c3c;
}

.dropdown-text {
    flex: 1;
    color: #333;
}

.dropdown-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: fixed;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-dropdown.open .dropdown-options {
    display: block;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-option:hover {
    background-color: #f5f5f5;
}

.dropdown-option.selected {
    background-color: #e6f3ff;
    font-weight: 600;
}

.option-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-right: 10px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    color: #333;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #156082;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #156082;
    border-color: #156082;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* RST Person Icon */
.rst-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #156082;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rst-icon .material-icons {
    font-size: 16px;
    color: white;
}

.modal-actions {
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-actions-right {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    filter: brightness(1.1);
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    filter: brightness(1.1);
}

.btn-save {
    background: #4CAF50;
    color: white;
}

.btn-save:hover {
    filter: brightness(1.1);
}

.post-it {
    background: #ffffcc;
    border: none;
    padding: 10px;
    width: 150px;
    height: 150px;
    cursor: move;
    position: relative;
    margin: 5px;
    z-index: 10;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Category colors - much paler versions with no borders */
.post-it[data-category="DISEASE_STATE"] {
    background: #fff5f5;
}

.post-it[data-category="PRODUCT"] {
    background: #f5fff5;
}

.post-it[data-category="LANDSCAPE"] {
    background: #f5f5ff;
}

.post-it[data-category="MARKET_ACCESS"] {
    background: #fffff5;
}

.post-it[data-category="HR"] {
    background: #fff5ff;
}

.post-it[data-category="IT"] {
    background: #f5ffff;
}

.post-it[data-category="PLANNING"] {
    background: #fff9f5;
}

.post-it[data-category="SKILLS"] {
    background: #f8f5ff;
}

.post-it[data-category="COMPLIANCE"] {
    background: #fff9f5;
}

.post-it[data-category="OTHER"] {
    background: #f8f8f8;
}


/* Post-its in the left panel should be stacked */
.left-panel .post-it {
    position: absolute;
    margin: 5px;
    left: 50%;
    /* Center horizontally - transform will be set by JavaScript */
}

/* Post-its in drop zones should be positioned in a 5-column grid */
.drop-zone {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 0;
    height: 100%;
    max-height: 100%;
    align-content: start;
}

.drop-zone .post-it {
    position: relative;
    top: auto;
    left: auto;
    margin: 0;
    width: 100%;
    height: 150px;
    max-width: 150px;
    justify-self: center;
}

.post-it-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-it h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-it p {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

/* Hover buttons container */
.post-it-actions {
    position: absolute;
    top: 5px;
    left: 5px;
    display: none;
    gap: 5px;
    z-index: 20;
}

/* Show hover buttons on all post-its when hovered or when dropdown is open */
.post-it:hover .post-it-actions,
.post-it.dropdown-open .post-it-actions {
    display: flex;
}

.post-it-action-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
}

.post-it-action-btn .material-icons {
    font-size: 16px;
    line-height: 1;
}

.post-it-action-btn:hover {
    filter: brightness(1.2);
}

.post-it-action-btn.delete {
    background: rgba(231, 76, 60, 0.8);
}

.post-it-action-btn.delete:hover {
    filter: brightness(1.2);
}

.post-it-action-btn.edit {
    background: rgba(52, 152, 219, 0.8);
}

.post-it-action-btn.edit:hover {
    filter: brightness(1.2);
}

.post-it-action-btn.move {
    background: rgba(76, 175, 80, 0.8);
}

.post-it-action-btn.move:hover {
    filter: brightness(1.2);
}

/* Row label cursor indicator */
.row-label-text {
    margin-right: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.row-label-text:hover {
    color: #156082;
}

/* Phase Dropdown Styles */
.phase-dropdown {
    position: relative;
    display: inline-block;
}

.phase-dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    top: 100%;
    left: 0;
}

/* When dropdown is moved to body for proper layering */
.phase-dropdown-content.show {
    display: block;
}

.phase-dropdown-content.show {
    display: block;
}

.phase-dropdown-option {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.phase-dropdown-option:last-child {
    border-bottom: none;
}

.phase-dropdown-option:hover {
    background-color: #f5f5f5;
}

.phase-dropdown-option .phase-name {
    font-weight: 600;
    color: #156082;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.phase-dropdown-option .phase-type {
    font-size: 12px;
    color: #666;
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

/* Phase Dropdown Header Styles */
.phase-dropdown-header {
    color: #333;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    background-color: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.phase-dropdown-header:hover {
    background-color: #e9ecef;
}

.phase-header-name {
    color: #156082;
    font-size: 14px;
    font-weight: 500;
}

.phase-header-arrow {
    color: #666;
    font-size: 10px;
}

.phase-row-types {
    display: none;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.phase-row-type {
    color: #333;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-row-type:last-child {
    border-bottom: none;
}

.phase-row-type:hover {
    background-color: #f8f9fa;
    color: #156082;
    font-weight: 500;
}

/* Ghost mode styling - simplified */
.ghost-mode {
    /* No special styling - just leave it where it was */
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.25);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #156082;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
