.organizationentity-viewer-container {
    font-family: 'Arial', sans-serif;
    padding: 20px;
    background-color: #ffffff;
}

.viewer-layout {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.parent-panel {
    flex: 0 0 35%;
    border: 2px solid #3498db;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
}

.children-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 15px 20px;
    border-bottom: 2px solid #2980b9;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.panel-content {
    padding: 20px;
}

.data-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    flex: 0 0 45%;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.data-value {
    flex: 1;
    color: #34495e;
    font-size: 14px;
}

.risk-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.risk-green {
    background-color: #27ae60;
}

.risk-yellow {
    background-color: #f39c12;
}

.risk-red {
    background-color: #e74c3c;
}

.risk-gray {
    background-color: #95a5a6;
}

.child-section {
    border: 2px solid #3498db;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.section-header:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

.section-header h4 {
    flex: 1;
    margin: 0 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.section-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.count-badge {
    background-color: #ffffff;
    color: #2980b9;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.section-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.section-content.expanded {
    max-height: 1000px;
    padding: 15px;
}

.entity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entity-item {
    padding: 12px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.entity-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    transform: translateX(5px);
}

.entity-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.entity-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.no-data {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.entity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-icon:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@media (max-width: 768px) {
    .viewer-layout {
        flex-direction: column;
    }
    
    .parent-panel {
        flex: 1;
    }
}